From 94dc95d6a5454d9dbdea8572bdd926f7aeec22ff Mon Sep 17 00:00:00 2001 From: Zack Koppert Date: Mon, 16 Oct 2023 09:24:34 -0700 Subject: [PATCH] Fix automation for release action.yml updates --- .github/workflows/release.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc95a064..b93b858f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,28 +97,18 @@ jobs: # Full git history is needed to get a proper list of commits and tags fetch-depth: 0 - - name: Update action.yml release version number - uses: fjogeleit/yaml-update-action@main - with: - valueFile: 'action.yaml' - propertyPath: 'runs.image' - value: docker://ghcr.io/super-linter/super-linter:${{ env.RELEASE_VERSION }} - commitChange: true - message: update action.yml version pointer - branch: main - token: ${{ secrets.GITHUB_TOKEN }} + - name: Update action.yml + run: yq '.runs.image = "docker://ghcr.io/super-linter/super-linter:${{ env.RELEASE_VERSION }}"' -i action.yml - - name: Update slim/action.yml release version number - uses: fjogeleit/yaml-update-action@main - with: - valueFile: 'slim/action.yaml' - propertyPath: 'runs.image' - value: docker://ghcr.io/super-linter/super-linter:slim-${{ env.RELEASE_VERSION }} - commitChange: true - message: update slim/action.yml version pointer - branch: main - token: ${{ secrets.GITHUB_TOKEN }} + - name: Update slim/action.yml + run: yq '.runs.image = "docker://ghcr.io/super-linter/super-linter:slim-${{ env.RELEASE_VERSION }}"' -i slim/action.yml + - uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. + with: + add: 'action.yml slim/action.yml' + default_author: github_actions + message: 'Automated update of action.yml and slim/action.yml version numbers' + # We use ^{} to recursively deference the tag to get the commit the tag is pointing at. # Then, we use that reference to create new tags, so that the new tags point to the commit # the original tag was pointing to, and not to the original tag.