Skip to content

Commit 50e304a

Browse files
authored
Merge pull request #6003 from wileyj/chore/update_ci
Release workflow updates
2 parents 9e7fc89 + 9f9c160 commit 50e304a

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
needs:
9595
- rustfmt
9696
- check-release
97+
secrets: inherit
9798
uses: ./.github/workflows/github-release.yml
9899
with:
99100
node_tag: ${{ needs.check-release.outputs.node_tag }}

.github/workflows/core-build-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Build the binaries
2525
id: build
2626
run: |
27-
cargo build
27+
cargo build --bin stacks-inspect
2828
- name: Dump constants JSON
2929
id: consts-dump
3030
run: cargo run --bin stacks-inspect -- dump-consts | tee out.json

.github/workflows/github-release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ concurrency:
3838
run-name: ${{ inputs.node_tag || inputs.signer_tag }}
3939

4040
jobs:
41-
## This job's sole purpose is trigger a secondary approval outside of the matrix jobs below.
41+
## This job's sole purpose is trigger a secondary approval outside of the matrix jobs below.
4242
## - If this job isn't approved to run, then the subsequent jobs will also not run - for this reason, we always exit 0
43-
## - `andon-cord` requires the repo environment "Build Release", which will trigger a secondary approval step before running this workflow.
43+
## - `andon-cord` requires the repo environment "Build Release", which will trigger a secondary approval step before running this workflow.
4444
andon-cord:
4545
if: |
4646
inputs.node_tag != '' ||
@@ -65,6 +65,9 @@ jobs:
6565
runs-on: ubuntu-latest
6666
needs:
6767
- andon-cord
68+
permissions:
69+
id-token: write
70+
attestations: write
6871
strategy:
6972
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
7073
max-parallel: 10
@@ -135,6 +138,10 @@ jobs:
135138
inputs.signer_tag != ''
136139
name: Docker Image (Binary)
137140
runs-on: ubuntu-latest
141+
environment: "Push to Docker"
142+
permissions:
143+
id-token: write
144+
attestations: write
138145
needs:
139146
- andon-cord
140147
- build-binaries
@@ -164,7 +171,6 @@ jobs:
164171
## Create the downstream PR for the release branch to master,develop
165172
create-pr:
166173
if: |
167-
!contains(github.ref, '-rc') &&
168174
(
169175
inputs.node_tag != '' ||
170176
inputs.signer_tag != ''

.github/workflows/image-build-source.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
runs-on: ubuntu-latest
2424
## Requires the repo environment "Push to Docker", which will trigger a secondary approval step before running this workflow.
2525
environment: "Push to Docker"
26+
permissions:
27+
id-token: write
28+
attestations: write
2629
steps:
2730
## Setup Docker for the builds
2831
- name: Docker setup
@@ -68,3 +71,22 @@ jobs:
6871
GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
6972
TARGET_CPU=x86-64-v3
7073
push: ${{ env.DOCKER_PUSH }}
74+
75+
## Generate docker image attestation(s)
76+
- name: Generate artifact attestation (${{ github.event.repository.name }})
77+
id: attest_primary
78+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
79+
with:
80+
subject-name: |
81+
index.docker.io/${{env.docker-org}}/${{ github.event.repository.name }}
82+
subject-digest: ${{ steps.docker_build.outputs.digest }}
83+
push-to-registry: true
84+
85+
- name: Generate artifact attestation (stacks-blockchain)
86+
id: attest_secondary
87+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
88+
with:
89+
subject-name: |
90+
index.docker.io/${{env.docker-org}}/stacks-blockchain
91+
subject-digest: ${{ steps.docker_build.outputs.digest }}
92+
push-to-registry: true

0 commit comments

Comments
 (0)