GHA migration: secrets check #45
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache: false | |
- name: Lint | |
uses: golangci/golangci-lint-action@v4 | |
- name: Test | |
run: go test -v ./... | |
- name: Build | |
run: make build | |
fossa: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write # needed for the Vault authentication | |
steps: | |
- name: "Load Secrets from Vault" | |
uses: rancher-eio/read-vault-secrets@main | |
with: | |
secrets: | | |
secret/data/github/repo/${{ github.repository }}/fossa/credentials token | FOSSA | |
- uses: actions/checkout@v3 | |
- uses: fossas/fossa-action@main | |
with: | |
api-key: ${{ env.FOSSA }} |