Action for generating build provenance attestations for workflow artifacts
Go to file
2024-07-03 03:23:55 +02:00
__tests__ bump @actions/attest from 1.2.1 to 1.3.0 (#114) 2024-06-12 13:55:10 -07:00
.github Revert "disable github action linting (#54)" (#102) 2024-06-04 08:37:47 -07:00
dist Bump the npm-development group across 1 directory with 5 updates (#141) 2024-07-02 12:30:58 -07:00
predicate rename internal actions (phase 1) (#20) 2024-03-04 15:16:47 -08:00
src bump @actions/attest from 1.0.0 to 1.1.0 (#33) 2024-03-29 08:47:10 -07:00
.eslintignore reference @actions/attest package (#10) 2024-02-26 14:49:08 -08:00
.gitattributes Initial commit 2024-02-20 11:26:39 -08:00
.gitignore reference @actions/attest package (#10) 2024-02-26 14:49:08 -08:00
.node-version Initial commit 2024-02-20 11:26:39 -08:00
.prettierignore Initial commit 2024-02-20 11:26:39 -08:00
.prettierrc.json Initial commit 2024-02-20 11:26:39 -08:00
action.yml bump actions/attest from 1.3.1 to 1.3.2 (#123) 2024-06-17 10:34:13 -07:00
CODEOWNERS add package-security team to CODEOWNERS 2024-02-23 17:15:18 -08:00
jest.setup.js unit test (#13) 2024-02-29 17:04:03 -08:00
LICENSE Initial commit 2024-02-20 11:26:39 -08:00
package-lock.json Bump the npm-development group across 1 directory with 5 updates (#141) 2024-07-02 12:30:58 -07:00
package.json Bump the npm-development group across 1 directory with 5 updates (#141) 2024-07-02 12:30:58 -07:00
README.yml Update and rename README.md to README.yml 2024-07-03 03:23:55 +02:00
RELEASE.md update release documentation (#66) 2024-05-10 10:47:07 -07:00
tsconfig.json reference @actions/attest package (#10) 2024-02-26 14:49:08 -08:00

name: build-attested-image

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      packages: write
      contents: read
      attestations: write
    env:
      REGISTRY: ghcr.io
      IMAGE_NAME: ${{ github.repository }}

    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - name: Build and push image
        id: push
        uses: docker/build-push-action@v5.0.0
        with:
          context: .
          push: true
          tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
      - name: Attest
        uses: actions/attest-build-provenance@v1
        id: attest
        with:
          subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
          subject-digest: ${{ steps.push.outputs.digest }}
          push-to-registry: true