Skip to content

Commit

Permalink
feat(ci): bump release image version after build
Browse files Browse the repository at this point in the history
Signed-off-by: iverly <[email protected]>
  • Loading branch information
iverly committed Apr 22, 2024
1 parent 7a541a9 commit 8bd6c7f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,27 @@ jobs:
- name: Sign the images with GitHub OIDC Token
run: |
cosign sign --yes ${{ steps.apko.outputs.digest }}
bump-version:
runs-on: ubuntu-latest
needs: build-and-push
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]

- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Bump version
run: |
sed -i 's|image: harbor.apko.do-2021.fr/do4-2022/openstack-k0s-apko/hello-world:[^ ]*|image: harbor.apko.do-2021.fr/do4-2022/openstack-k0s-apko/hello-world:${{ steps.vars.outputs.sha_short }}|' apps/hello-world/manifests/deployment.yaml
- name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "build: bump release image to ${{ steps.vars.outputs.sha_short }}"
commit_options: "-a --no-verify --signoff"
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

0 comments on commit 8bd6c7f

Please sign in to comment.