diff --git a/.github/workflows/autocommit.yaml b/.github/workflows/autocommit.yaml index 51ed81a6ee..c34d32db69 100644 --- a/.github/workflows/autocommit.yaml +++ b/.github/workflows/autocommit.yaml @@ -4,7 +4,10 @@ on: push: branches: - main - - production + - PLT-6842-autodeploy + create: + tags: + - '*' jobs: run: @@ -14,19 +17,21 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 with: - ref: main + # ref: main + ref: PLT-6842-autodeploy - name: Update publish version id: update run: | VERSION=${GITHUB_SHA::8} - if [ "$GITHUB_REF" = refs/heads/production ]; then - TYPE=production + if [ "${{ github.event_name }}" = push ]; then + TYPE=qa else - TYPE=staging + TYPE=demo fi - echo ::set-output name=VERSION::${VERSION} - sed -i "s|${TYPE}Tag:.*|${TYPE}Tag: \"$VERSION\"|g" deploy/values.yaml + echo name=VERSION::${VERSION} >> $GITHUB_OUTPUT + yq e -i '.instances.${TYPE}.tag = "${VERSION}"' deploy/marlowe-runtime/values.yaml + yq e -i '.instances.${TYPE}.webTag = "${VERSION}"' deploy/marlowe-runtime/values.yaml - name: Commit changes uses: EndBug/add-and-commit@v7