From 8bd6c7f315d06e3a023f7dd2c9bd7266b5b60408 Mon Sep 17 00:00:00 2001 From: iverly Date: Mon, 22 Apr 2024 10:50:09 +0200 Subject: [PATCH] feat(ci): bump release image version after build Signed-off-by: iverly --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5a9b050..d63352f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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/checkout@v3.5.2 + + - 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]