Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
fjogeleit committed Dec 8, 2023
1 parent 3e1390b commit f4fa523
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 45 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- development
- alpha

paths-ignore:
- README.md
Expand All @@ -22,15 +22,21 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Checkout code
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

- name: Calc coverage
run: make coverage

- name: Convert coverage to lcov
uses: jandelgado/[email protected]

- name: Coveralls
uses: coverallsapp/[email protected]
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/cr.yaml

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: release
name: release-chart

on:
push:
branches:
- 'alpha'
tags:
- 'policy-reporter-alpha-chart-v*'

jobs:
helm-chart:
Expand All @@ -14,6 +14,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Verify Helm Docs
run: |
set -e
make verify-helm-docs
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
Expand All @@ -25,11 +29,12 @@ jobs:
- name: Set version
run: |
set -e
echo "APP_VERSION=3.0.0-alpha-${{ env.TAG }}" >> $GITHUB_ENV
echo "CHART_VERSION=3.0.0-alpha-${{ env.TAG }}" >> $GITHUB_ENV
TAG=${{ github.ref_name }}
echo "CHART_VERSION=${TAG#policy-reporter-alpha-chart--}" >> $GITHUB_ENV
- name: Run chart-releaser
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 #v1.7.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
linting: off
charts_dir: charts
chart_version: ${{ env.CHART_VERSION }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: image
name: release-image
on:
push:
tags:
- v*
- dev
branches:
- alpha

permissions:
contents: read
Expand All @@ -21,11 +20,11 @@ jobs:
id: params
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
VERSION=$(git rev-parse --short "$GITHUB_SHA")
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
echo "::set-output name=version::$VERSION"
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Login to Github Packages
uses: docker/login-action@v2
Expand All @@ -49,12 +48,11 @@ jobs:
id: push
with:
push: true
platforms: linux/arm64,linux/amd64,linux/s390x
platforms: linux/arm64,linux/amd64
cache-from: type=registry,ref=ghcr.io/kyverno/policy-reporter:buildcache
cache-to: type=registry,ref=ghcr.io/kyverno/policy-reporter:buildcache,mode=max
tags: |
ghcr.io/kyverno/policy-reporter:latest
ghcr.io/kyverno/policy-reporter:${{ steps.params.outputs.version }}
ghcr.io/kyverno/policy-reporter:${{ env.VERSION }}
- uses: CycloneDX/gh-gomod-generate-sbom@d4aee0cf5133055dbd98899978246c10c18c440f # v1.1.0
with:
Expand Down

0 comments on commit f4fa523

Please sign in to comment.