Skip to content

Add helm chart and push images #4

Add helm chart and push images

Add helm chart and push images #4

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/goreleaser.yaml (Line: 29, Col: 13): Unexpected symbol: '"refs/tags"'. Located at position 26 within expression: !startsWith(github.ref , "refs/tags") .github/workflows/goreleaser.yaml (Line: 39, Col: 13): Unexpected symbol: '"refs/tags"'. Located at position 25 within expression: startsWith(github.ref , "refs/tags")
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 }}