From a766d1d30857bda36473b61edc5bb0c823a31f57 Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Wed, 11 Oct 2023 01:34:06 +0530 Subject: [PATCH] workflow --- .github/workflows/go.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 925866c..0f2db19 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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: @@ -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 }} \ No newline at end of file