Add helm chart and push images #4
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: | ||
pull_request: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
goreleaser: | ||
permissions: | ||
contents: write | ||
packages: write | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.x" | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run GoReleaser (PR) | ||
uses: goreleaser/goreleaser-action@v5 | ||
if: '!startsWith(github.ref , "refs/tags")' | ||
Check failure on line 29 in .github/workflows/goreleaser.yaml GitHub Actions / ReleaseInvalid workflow file
|
||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --snapshot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run GoReleaser (Publish Release) | ||
uses: goreleaser/goreleaser-action@v5 | ||
if: 'startsWith(github.ref , "refs/tags")' | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: azure/setup-helm@v3 | ||
if: 'startsWith(github.ref , "refs/tags")' | ||
- run: | | ||
helm package ./deploy/chart --version ${GITHUB_REF_NAME#v} | ||
helm push ./secret-transform-${GITHUB_REF_NAME#v}.tgz oci://ghcr.io/${{ github.repository }} |