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]