Skip to content

Deployment

Deployment #101

Workflow file for this run

name: Deployment
concurrency:
group: production
cancel-in-progress: true
on:
workflow_run:
workflows: ["Docker build"]
types:
- completed
branches:
- 'master'
jobs:
deployment:
runs-on: ubuntu-latest
environment: m39
steps:
-
name: Checkout
uses: actions/checkout@v4
- name: git tag
run: git fetch --tags; git fetch --prune --unshallow || true
- name: Extract tag name
id: dockerTag
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const tagExec = await exec.getExecOutput('git', ['describe', '--tags', '--abbrev=0']);
let tag = tagExec.stdout || tagExec.stderr;
tag = tag.trim().replace('v', '');
return tag;
-
name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ secrets.REPO_NAME }}
path: infra
token: ${{ secrets.GHR_TOKEN }}
- name: Update Image Version in the related HelmChart values.yaml
uses: fjogeleit/yaml-update-action@v0.10.0
with:
valueFile: 'mort/values.yaml'
propertyPath: 'image.tag'
value: ${{ steps.dockerTag.outputs.result }}
repository: ${{ secrets.REPO_NAME }}
branch: master
# targetBranch: master
createPR: false
message: 'Update mort image to ${{ steps.dockerTag.outputs.result}}'
token: ${{ secrets.GHR_TOKEN }}
workDir: infra