Set Image Version #8041
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Set Image Version | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
type: choice | |
description: The branch to update. 'dev' will deploy to dev. 'main' will deploy to qa and start a pipeline to | |
deploy to live. | |
required: false | |
options: | |
- dev | |
- main | |
default: dev | |
name: | |
type: choice | |
description: The service to update | |
required: true | |
options: | |
- ui | |
- mothership | |
- cdk | |
- mock-host | |
- admin | |
image_uri: | |
type: string | |
description: The entire name, or just the tag, of the remote image | |
required: true | |
source_action: | |
type: string | |
description: Set when this workflow is triggered remotely | |
required: true | |
default: set manually | |
source_commit: | |
type: string | |
description: Set when this workflow is triggered remotely | |
required: true | |
default: set manually | |
force: | |
type: boolean | |
description: By default this workflow will skip if the existing tag is NOT a semantic version. Checking this | |
will make it update regardless. | |
required: false | |
default: true | |
jobs: | |
set-version: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Generate a token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: 862323 | |
private-key: ${{ secrets.SERVICE_APP_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
token: ${{ steps.generate-token.outputs.token }} | |
- run: ./set-version.sh ${{ github.event.inputs.name }} ${{ github.event.inputs.image_uri }} '${{ github.event.inputs.source_action }}' '${{ github.event.inputs.source_commit }}' ${{ github.event.inputs.force }} |