Skip to content

deploy

deploy #1405

Workflow file for this run

name: deploy
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
overlay:
description: The environment to update
default: 'dev'
required: true
tag:
description: The tag to deploy
default: 'dev'
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
updateConfig:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Kustomize
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Edit Kustomize
run: |
DIR=overlays/
cd overlays/${{ github.event.inputs.overlay }}
kustomize edit set image ghcr.io/biosimulations/account-api:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/dispatch-service:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/api:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/simulators-api:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/mail-service:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/combine-api:${{ github.event.inputs.tag }}
kustomize edit set image ghcr.io/biosimulations/simdata-api:${{ github.event.inputs.tag }}
- name: Remove Kustomize
run: |
rm -f kustomize
- name: Commit Changes
uses: EndBug/add-and-commit@v7
with:
author_name: Biosimulations-Daemon
author_email: [email protected]
branch: main
message: 'Changed image tag of ${{ github.event.inputs.overlay }} to ${{ github.event.inputs.tag }}'
signoff: true
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged