|
87 | 87 | release: ${{ needs.docker-configure.outputs.release }}
|
88 | 88 | commit: ${{ needs.docker-configure.outputs.commit }}
|
89 | 89 | build_date: ${{ needs.docker-configure.outputs.build_date }}
|
| 90 | + sign: true |
| 91 | + |
| 92 | + provenance-for-images-docker: |
| 93 | + if: ${{ github.event_name == 'push' }} |
| 94 | + needs: [docker-configure, docker-image] |
| 95 | + permissions: |
| 96 | + actions: read # for detecting the Github Actions environment. |
| 97 | + id-token: write # for creating OIDC tokens for signing. |
| 98 | + packages: write # for uploading attestations. |
| 99 | + uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] |
| 100 | + with: |
| 101 | + image: docker.io/falcosecurity/falcoctl |
| 102 | + # The image digest is used to prevent TOCTOU issues. |
| 103 | + # This is an output of the docker/build-push-action |
| 104 | + # See: https://github.com/slsa-framework/slsa-verifier#toctou-attacks |
| 105 | + digest: ${{ needs.docker-image.outputs.digest }} |
| 106 | + secrets: |
| 107 | + registry-username: ${{ secrets.DOCKERHUB_USER }} |
| 108 | + registry-password: ${{ secrets.DOCKERHUB_SECRET }} |
| 109 | + |
| 110 | + login-to-amazon-ecr: |
| 111 | + if: ${{ github.event_name == 'push' }} |
| 112 | + runs-on: ubuntu-22.04 |
| 113 | + permissions: |
| 114 | + contents: read |
| 115 | + id-token: write |
| 116 | + steps: |
| 117 | + - name: Configure AWS credentials |
| 118 | + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 |
| 119 | + with: |
| 120 | + role-to-assume: arn:aws:iam::292999226676:role/github_actions-falcoctl-ecr |
| 121 | + aws-region: us-east-1 |
| 122 | + |
| 123 | + - name: Login to Amazon ECR |
| 124 | + id: login-ecr-public |
| 125 | + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 |
| 126 | + with: |
| 127 | + registry-type: public |
| 128 | + mask-password: 'false' |
| 129 | + outputs: |
| 130 | + registry: ${{ steps.login-ecr-public.outputs.registry }} |
| 131 | + docker_username: ${{ steps.login-ecr-public.outputs.docker_username_public_ecr_aws }} |
| 132 | + docker_password: ${{ steps.login-ecr-public.outputs.docker_password_public_ecr_aws }} |
| 133 | + |
| 134 | + provenance-for-images-aws-ecr: |
| 135 | + if: ${{ github.event_name == 'push' }} |
| 136 | + needs: [docker-configure, docker-image, login-to-amazon-ecr] |
| 137 | + permissions: |
| 138 | + actions: read # for detecting the Github Actions environment. |
| 139 | + id-token: write # for creating OIDC tokens for signing. |
| 140 | + packages: write # for uploading attestations. |
| 141 | + uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] |
| 142 | + with: |
| 143 | + image: public.ecr.aws/falcosecurity/falcoctl |
| 144 | + # The image digest is used to prevent TOCTOU issues. |
| 145 | + # This is an output of the docker/build-push-action |
| 146 | + # See: https://github.com/slsa-framework/slsa-verifier#toctou-attacks |
| 147 | + digest: ${{ needs.docker-image.outputs.digest }} |
| 148 | + secrets: |
| 149 | + registry-username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }} |
| 150 | + registry-password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }} |
90 | 151 |
|
91 | 152 | test:
|
92 | 153 | needs: build
|
|
0 commit comments