Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions .github/workflows/test-build-update-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
paths-ignore:
- 'charts/fga-operator/values.yaml'
- 'charts/fga-operator/Chart.yaml'
- 'charts/fga-operator/Chart.yaml'
pull_request:
branches:
- main
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
with:
go-version-file: './operator/go.mod'
cache-dependency-path: './operator/go.sum'
check-latest: true
check-latest: true

- name: Build
working-directory: ./operator
Expand All @@ -70,7 +70,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4

- name: Build Docker image
working-directory: ./operator
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:

- name: Pust new tag
run: |
git push --tags
git push --tags

helm-update:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -167,6 +167,7 @@ jobs:
if: github.ref == 'refs/heads/main'
permissions:
contents: write
packages: write
needs:
- helm-update
steps:
Expand Down Expand Up @@ -195,7 +196,7 @@ jobs:

git merge origin/main
git push origin gh-pages

git checkout main

- name: Run chart-releaser
Expand All @@ -205,6 +206,24 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Login to GHCR
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push chart to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/fga-operator"
done


scan-image:
permissions:
actions: read
Expand Down Expand Up @@ -249,7 +268,7 @@ jobs:
with:
image: ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}:${{ env.IMAGE_TAG }}
args: --file=./operator/Dockerfile.goreleaser --severity-threshold=high --sarif-file-output=snyk.sarif

- name: Upload Snyk report as sarif
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down