fix(deps): update kubernetes to v0.31.2 #64
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: goreleaser | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
tags: | |
- "*.*.*" | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request' | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'push' | |
with: | |
fetch-depth: 0 | |
- name: setup-go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
- name: setup qemu | |
id: qemu | |
uses: docker/setup-qemu-action@v2 | |
- name: setup docker buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: install cosign | |
uses: sigstore/cosign-installer@main | |
with: | |
cosign-release: "v2.0.1" | |
- name: setup cosign | |
run: | | |
echo "${COSIGN_KEY}" > "$GITHUB_WORKSPACE/cosign.key" | |
env: | |
COSIGN_KEY: ${{ secrets.COSIGN_KEY }} | |
- name: set goreleaser default args | |
if: startsWith(github.ref, 'refs/tags/') == true | |
run: | | |
echo "GORELEASER_ARGS=" >> $GITHUB_ENV | |
- name: set goreleaser args for branch | |
if: startsWith(github.ref, 'refs/tags/') == false | |
run: | | |
echo "GORELEASER_ARGS=--snapshot" >> $GITHUB_ENV | |
- name: set goreleaser args renovate | |
if: startsWith(github.ref, 'refs/heads/renovate') == true | |
run: | | |
echo "GORELEASER_ARGS=--snapshot --skip-publish" >> $GITHUB_ENV | |
- name: run goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist ${{ env.GORELEASER_ARGS }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
- name: push docker images (for branches) | |
if: github.ref == 'refs/heads/main' || github.event.pull_request.base.ref == 'main' | |
run: | | |
docker images --format "{{.Repository}}:{{.Tag}}" | grep "ekristen/fides" | xargs -L1 docker push | |
- name: upload artifacts | |
if: github.event.pull_request.base.ref == 'main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: releases/*.tar.gz |