|
6 | 6 | permissions: |
7 | 7 | contents: read |
8 | 8 | jobs: |
9 | | - release: |
| 9 | + release-go-binary: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | permissions: |
12 | 12 | id-token: write |
@@ -42,37 +42,31 @@ jobs: |
42 | 42 | env: |
43 | 43 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
44 | 44 | TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} |
45 | | - - name: Set up Docker Buildx |
46 | | - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 |
47 | | - - name: Login to Docker Hub (docker.io) |
48 | | - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 |
49 | | - with: |
50 | | - registry: docker.io |
51 | | - username: ${{ secrets.DOCKER_HUB_USERNAME }} |
52 | | - password: ${{ secrets.DOCKER_HUB_RELEASE_TOKEN }} |
53 | | - - name: Login to GitHub Container Registry |
54 | | - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 |
55 | | - with: |
56 | | - registry: ghcr.io |
| 45 | + release-container-image: |
| 46 | + uses: docker/github-builder/.github/workflows/build.yml@c767551a26459c30e1f683df73a12fdb918f7068 # v1.0.0 |
| 47 | + permissions: |
| 48 | + id-token: write # to sign attestation(s) with GitHub OIDC Token |
| 49 | + packages: write # to push container image to ghcr |
| 50 | + with: |
| 51 | + output: image |
| 52 | + push: true |
| 53 | + platforms: linux/amd64,linux/arm64 |
| 54 | + sbom: true |
| 55 | + context: . |
| 56 | + set-meta-labels: true |
| 57 | + set-meta-annotations: true |
| 58 | + build-args: | |
| 59 | + "VERSION=${{ github.ref_name }}" |
| 60 | + meta-images: | |
| 61 | + ghcr.io/score-spec/score-radius |
| 62 | + scorespec/score-radius |
| 63 | + meta-tags: | |
| 64 | + type=ref,event=tag |
| 65 | + latest |
| 66 | + secrets: |
| 67 | + registry-auths: | |
| 68 | + - registry: ghcr.io |
57 | 69 | username: ${{ github.actor }} |
58 | 70 | password: ${{ secrets.GITHUB_TOKEN }} |
59 | | - - name: Build and push docker image |
60 | | - id: build-push-container |
61 | | - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 |
62 | | - with: |
63 | | - context: . |
64 | | - platforms: linux/amd64,linux/arm64 |
65 | | - push: true |
66 | | - provenance: mode=max |
67 | | - sbom: true |
68 | | - tags: | |
69 | | - ghcr.io/score-spec/score-radius:${{ github.ref_name }} |
70 | | - ghcr.io/score-spec/score-radius:latest |
71 | | - docker.io/scorespec/score-radius:${{ github.ref_name }} |
72 | | - docker.io/scorespec/score-radius:latest |
73 | | - build-args: | |
74 | | - "VERSION=${{ github.ref_name }}" |
75 | | - - name: Sign container image |
76 | | - run: | |
77 | | - cosign sign --yes ghcr.io/score-spec/score-radius@${{ steps.build-push-container.outputs.digest }} |
78 | | - cosign sign --yes scorespec/score-radius@${{ steps.build-push-container.outputs.digest }} |
| 71 | + - username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 72 | + password: ${{ secrets.DOCKER_HUB_RELEASE_TOKEN }} |
0 commit comments