Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
prady0t committed Oct 10, 2023
1 parent 1780979 commit a766d1d
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go
name: Container signing

on:
push:
Expand All @@ -12,17 +9,23 @@ on:
jobs:

build:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1.6.0

- name: Build
run: go build -v ./...
- name: Install cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.3.1'

- name: Test
run: go test -v ./...
- name: Sign the container image
env:
COSIGN_EXPERIMENTAL: "true"
run: |
cosign sign \
${REPO}@${{ steps.push-step.outputs.digest }}

0 comments on commit a766d1d

Please sign in to comment.