include sha in image tag and update values.yaml on tags #8
Workflow file for this run
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: Auto Commit | |
on: | |
push: | |
branches: | |
- main | |
- PLT-6842-autodeploy | |
create: | |
tags: | |
- runtime@v* | |
- marlowe-runtime-web@v* | |
- marlowe-apps@v* | |
jobs: | |
run: | |
name: Auto Commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
# ref: main | |
ref: PLT-6842-autodeploy | |
- name: Update publish version | |
id: update | |
run: | | |
if [[ "${{ github.ref }}" == "refs/tags/runtime@v"* ]] | |
then | |
export TAG=$(echo "${{ github.ref_name }}" | sed -e "s/^runtime@v//") | |
echo TAG=$TAG | |
yq e -i '.instances.demo.webTag = env(TAG)' deploy/marlowe-runtime/values.yaml | |
elif [[ "${{ github.ref }}" == "refs/tags/marlowe-runtime-web@v"* ]] | |
then | |
export TAG=$(echo "${{ github.ref_name }}" | sed -e "s/^marlowe-runtime-web@v//") | |
echo TAG=$TAG | |
yq e -i '.instances.demo.webTag = env(TAG)' deploy/marlowe-runtime/values.yaml | |
else | |
echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_ENV | |
yq e -i '.instances.qa.tag = env(TAG)' deploy/marlowe-runtime/values.yaml | |
yq e -i '.instances.qa.webTag = env(TAG)' deploy/marlowe-runtime/values.yaml | |
fi | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v7 | |
with: | |
default_author: github_actions | |
add: '.' | |
message: "[ci skip] deploy from ${{ steps.update.outputs.VERSION }}" | |
signoff: true | |
branch: PLT-6842-autodeploy |