From 4b0ec935ccfcb56ea7ac2063907ef0fcdab6a9fb Mon Sep 17 00:00:00 2001 From: Luke Hinds <7058938+lukehinds@users.noreply.github.com> Date: Fri, 1 Oct 2021 12:48:57 +0100 Subject: [PATCH] Set up OIDC job --- .github/workflows/blank.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..4d33e3c --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,33 @@ +name: CI +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + permissions: + id-token: write # undocumented OIDC support. + packages: write + contents: read + env: + COSIGN_EXPERIMENTAL: "true" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Cosign + uses: sigstore/cosign-installer@main + - name: Build and Push container images + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/lukehinds/cosign-oidc:${{ github.sha }} + - name: Sign image + run: | + cosign sign ghcr.io/lukehinds/cosign-oidc:${{ github.sha }}