Merge pull request #17827 from Homebrew/SMillerDev-patch-1
feat: add attestation to installer
This commit is contained in:
commit
2a5eb025f1
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -23,6 +23,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version: ["18.04", "20.04", "22.04", "24.04"]
|
version: ["18.04", "20.04", "22.04", "24.04"]
|
||||||
|
permissions:
|
||||||
|
contents: read # for code access
|
||||||
|
attestations: write # for actions/attest-build-provenance
|
||||||
|
id-token: write # for actions/attest-build-provenance
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
9
.github/workflows/pkg-installer.yml
vendored
9
.github/workflows/pkg-installer.yml
vendored
@ -19,6 +19,10 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
if: github.repository_owner == 'Homebrew' && github.actor != 'dependabot[bot]'
|
if: github.repository_owner == 'Homebrew' && github.actor != 'dependabot[bot]'
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
permissions:
|
||||||
|
contents: read # for code access
|
||||||
|
attestations: write # for actions/attest-build-provenance
|
||||||
|
id-token: write # for actions/attest-build-provenance
|
||||||
outputs:
|
outputs:
|
||||||
installer_path: "Homebrew-${{ steps.homebrew-version.outputs.version }}.pkg"
|
installer_path: "Homebrew-${{ steps.homebrew-version.outputs.version }}.pkg"
|
||||||
env:
|
env:
|
||||||
@ -119,6 +123,11 @@ jobs:
|
|||||||
security delete-keychain "${RUNNER_TEMP}/${TEMPORARY_KEYCHAIN_FILE}"
|
security delete-keychain "${RUNNER_TEMP}/${TEMPORARY_KEYCHAIN_FILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Generate build provenance
|
||||||
|
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
|
||||||
|
with:
|
||||||
|
subject-path: Homebrew-${{ steps.homebrew-version.outputs.version }}.pkg
|
||||||
|
|
||||||
- name: Upload installer to GitHub Actions
|
- name: Upload installer to GitHub Actions
|
||||||
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
|
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
|
||||||
with:
|
with:
|
||||||
|
24
.github/workflows/tests.yml
vendored
24
.github/workflows/tests.yml
vendored
@ -241,12 +241,28 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN }} |
|
echo ${{ secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN }} |
|
||||||
docker login ghcr.io -u BrewTestBot --password-stdin
|
docker login ghcr.io -u BrewTestBot --password-stdin
|
||||||
docker tag brew "ghcr.io/homebrew/ubuntu22.04:master"
|
docker tag brew "ghcr.io/homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||||
docker push "ghcr.io/homebrew/ubuntu22.04:master"
|
docker push "ghcr.io/homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||||
echo ${{ secrets.HOMEBREW_BREW_DOCKER_TOKEN }} |
|
echo ${{ secrets.HOMEBREW_BREW_DOCKER_TOKEN }} |
|
||||||
docker login -u brewtestbot --password-stdin
|
docker login -u brewtestbot --password-stdin
|
||||||
docker tag brew "homebrew/ubuntu22.04:master"
|
docker tag brew "homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||||
docker push "homebrew/ubuntu22.04:master"
|
docker push "homebrew/ubuntu22.04:${{ github.ref_name }}"
|
||||||
|
|
||||||
|
- name: Generate Docker 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 Docker image 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:
|
update-test:
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user