Skip to content

2.9.4

2.9.4 #149

Workflow file for this run

name: Release
# Only trigger this action when a new release is published
on:
release:
types: [published]
jobs:
SBOM-upload:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Generate SBOM
# generation command documentation: https://github.com/microsoft/sbom-tool#sbom-generation
run: |
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/download/v1.2.0/sbom-tool-linux-x64
chmod +x $RUNNER_TEMP/sbom-tool
$RUNNER_TEMP/sbom-tool generate -b . -bc . -pn $ -pv 1.0.0 -ps "Pavol Ipoth" -nsb https://github.com/gogatekeeper -V Verbose
- uses: actions/upload-artifact@v3
with:
name: sbom
path: _manifest/spdx_2.2
- name: SBOM upload
uses: advanced-security/[email protected]
with:
filePath: "_manifest/spdx_2.2/"
goreleaser:
runs-on: ubuntu-latest
steps:
# Setup the workflow to use the specific version of Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.21.6"
# Checkout the repository
- name: Checkout
uses: actions/checkout@v2
# Cleans up unreachable Git objects and convert a shallow clone to a regular one if needed
- name: Unshallow
run: git fetch --prune --unshallow
# Publish the binaries
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: "Create k3d Cluster for E2E testing"
uses: AbsaOSS/[email protected]
with:
cluster-name: "testcluster"
args: >-
-p "8081:80@loadbalancer"
- name: "Run Tests"
run: |
k3d kubeconfig merge testcluster --kubeconfig-switch-context
KUBECONFIG=~/.k3d/kubeconfig-testcluster.yaml kubectl apply -f ./e2e/k8s/manifest.yml
go test -v -race ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}