Fix release workflow #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" | |
permissions: | |
contents: read | |
jobs: | |
artifacts: | |
name: Artifacts | |
uses: ./.github/workflows/artifacts.yml | |
with: | |
publish: true | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
security-events: write | |
release: | |
name: Create release | |
runs-on: ubuntu-latest | |
needs: artifacts | |
permissions: | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Release | |
run: gh release create ${{ github.ref_name }} --latest=true --generate-notes | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update: | |
name: Update deploy branch | |
runs-on: ubuntu-latest | |
needs: release | |
permissions: | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
ref: deploy | |
- name: Install kustomize | |
uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0 | |
- name: Update image | |
run: | | |
cd overlays/prod | |
kustomize edit set image ghcr.io/artefactual-labs/ccp:${{ github.ref_name }} | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Bump image tag to ${{ github.ref_name }}" | |
git push |