Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

build: update actions/checkout action to v4 #67

build: update actions/checkout action to v4

build: update actions/checkout action to v4 #67

Workflow file for this run

name: app
on:
push:
branches:
- '**'
jobs:
test:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# match Kubectl version to kind cluster version used in scaffolding setup
# https://github.com/sigstore/scaffolding/blob/8f5907d5dc59c1af0e3c757486105179eab3301a/hack/setup-kind.sh#L80-L81
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/v1.25.0/bin/linux/amd64/kubectl"
chmod +x kubectl
mkdir -p $HOME/.bin/kubectl
mv kubectl $HOME/.bin/kubectl/
echo "$HOME/.bin/kubectl" >> $GITHUB_PATH
- name: Detect Workflow
id: detect-workflow
uses: slsa-framework/slsa-github-generator/.github/actions/[email protected]
- name: Sigstore Setup
uses: sigstore/scaffolding/actions/[email protected]
with:
k8s-version: "v1.25.x"
version: "v0.6.4"
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Download Deps
run: go mod download
- name: Build
run: make build
- name: Move TUF root
run: mv root.json test/
- name: Run Tests
env:
KEYLESS_ISSUER: "https://token.actions.githubusercontent.com"
KEYLESS_SUBJECT: ${{ github.server_url }}/${{ github.repository }}/${{ steps.detect-workflow.outputs.workflow }}@${{ steps.detect-workflow.outputs.ref }}
# the attestation tool expects a value for GITHUB_TOKEN, but interactions with the GitHub API are replayed from fixtures
GITHUB_TOKEN: "invalid"
REGISTRY_URL: "registry.local:5000"
run: make test
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup Semantic Release
run: npm install -g semantic-release -D
- name: Release
run: npx semantic-release
env:
GH_TOKEN: ${{ github.token }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}