Skip to content

Add fsGroup variable for Trivy plugin (#318) #91

Add fsGroup variable for Trivy plugin (#318)

Add fsGroup variable for Trivy plugin (#318) #91

Workflow file for this run

name: release
on:
workflow_dispatch:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
permissions:
contents: write
packages: write
env:
CHARTS_REPOSITORY_PATH: charts.undistro.io
CHART_PATH: charts/zora
COMMIT_MESSAGE: "update zora chart"
GIT_USER: "undistrobot"
GIT_EMAIL: "[email protected]"
jobs:
docker:
uses: ./.github/workflows/docker.yaml
secrets: inherit
goreleaser:
runs-on: ubuntu-latest
needs: [docker]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: fetch tags
run: git fetch --force --tags
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
helm:
runs-on: ubuntu-latest
needs: [goreleaser]
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: main
- name: checkout charts
uses: actions/checkout@v4
with:
repository: undistro/helm-charts
ref: main
fetch-depth: 1
token: ${{ secrets.BOT_TOKEN }} # GITHUB_TOKEN is scoped to the current repository, so we need a PAT to checkout a different repository and commit on it.
path: ${{ env.CHARTS_REPOSITORY_PATH }}
- name: sync
run: rsync -avh --delete main/$CHART_PATH/ ${{ env.CHARTS_REPOSITORY_PATH }}/$CHART_PATH
- name: commit and push
working-directory: ${{ env.CHARTS_REPOSITORY_PATH }}
run: |
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USER"
git add $CHART_PATH
git status
git diff-index --quiet HEAD || git commit -m "$COMMIT_MESSAGE"
git push -u origin HEAD:main