fix: only add attestation to nightly docker
This commit is contained in:
parent
266a1bc953
commit
96afc21057
14
.github/workflows/docker.yml
vendored
14
.github/workflows/docker.yml
vendored
@ -67,20 +67,6 @@ jobs:
|
||||
docker tag brew "ghcr.io/homebrew/ubuntu${{matrix.version}}:latest"
|
||||
docker push "ghcr.io/homebrew/ubuntu${{matrix.version}}:latest"
|
||||
|
||||
- name: Generate image digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
id: digest
|
||||
run: echo "digest=$(docker image inspect --format='{{.Digest}}' brew:${brew_version})" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Generate build provenance
|
||||
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
id: attest
|
||||
with:
|
||||
subject-name: ghcr.io/homebrew/ubuntu${{matrix.version}}
|
||||
subject-digest: ${{ steps.digest.outputs.digest }}
|
||||
push-to-registry: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
- name: Deploy the tagged Docker image to Docker Hub
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
|
||||
28
.github/workflows/tests.yml
vendored
28
.github/workflows/tests.yml
vendored
@ -239,14 +239,30 @@ jobs:
|
||||
- name: Deploy the Docker image to GitHub Packages and Docker Hub
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
echo ${{secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN}} |
|
||||
echo ${{ secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN }} |
|
||||
docker login ghcr.io -u BrewTestBot --password-stdin
|
||||
docker tag brew "ghcr.io/homebrew/ubuntu22.04:master"
|
||||
docker push "ghcr.io/homebrew/ubuntu22.04:master"
|
||||
echo ${{secrets.HOMEBREW_BREW_DOCKER_TOKEN}} |
|
||||
docker tag brew "ghcr.io/homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||
docker push "ghcr.io/homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||
echo ${{ secrets.HOMEBREW_BREW_DOCKER_TOKEN }} |
|
||||
docker login -u brewtestbot --password-stdin
|
||||
docker tag brew "homebrew/ubuntu22.04:master"
|
||||
docker push "homebrew/ubuntu22.04:master"
|
||||
docker tag brew "homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||
docker push "homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||
|
||||
- name: Generate image digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
id: digest
|
||||
run: |
|
||||
digest="$(docker image inspect --format='{{.Digest}}' brew)"
|
||||
echo "digest=$digest" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Generate build provenance
|
||||
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
|
||||
if: github.ref == 'refs/heads/master'
|
||||
id: attest
|
||||
with:
|
||||
push-to-registry: true
|
||||
subject-digest: ${{ steps.digest.outputs.digest }}
|
||||
subject-name: ghcr.io/homebrew/ubuntu22.04:${{ github.ref_name }}
|
||||
|
||||
update-test:
|
||||
name: ${{ matrix.name }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user