Release snapshot #293
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Release snapshot | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 0 * * * | |
env: | |
GO_VERSION: 1.19.1 | |
permissions: {} | |
jobs: | |
release-snapshot: | |
name: Release unversioned snapshot | |
runs-on: ubuntu-20.04 | |
env: | |
DOCKER_CLI_EXPERIMENTAL: enabled | |
permissions: | |
id-token: write | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install cosign | |
uses: sigstore/[email protected] | |
- name: Release snapshot | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: v1.7.0 | |
args: release --snapshot --skip-publish --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COSIGN_EXPERIMENTAL: 1 | |
- name: Scan Node Collector image for vulnerabilities | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: ghcr.io/aquasecurity/node-collector:${{ github.sha }}-amd64 | |
exit-code: "1" | |
ignore-unfixed: true | |
severity: CRITICAL,HIGH | |
- name: Notify dedicated teams channel | |
uses: jdcargile/[email protected] | |
if: failure() | |
with: | |
github-token: ${{ secrets.ORG_REPO_TOKEN }} | |
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} | |
notification-summary: vulnerabilities has been found in k8s-node-collector image | |
notification-color: 17a2b8 | |
timezone: America/Denver |