File tree 2 files changed +13
-28
lines changed
2 files changed +13
-28
lines changed Original file line number Diff line number Diff line change 1
1
name : Build, test, release and deploy
2
2
3
+ permissions :
4
+ id-token : write
5
+ contents : write
6
+
3
7
on :
4
8
workflow_dispatch :
5
9
inputs :
47
51
local-environment-tests :
48
52
needs : [build-pc-artifacts, partner-chains-smart-contracts]
49
53
uses : ./.github/workflows/modules/local-environment-tests.yml
50
- permissions :
51
- id-token : write
52
- contents : write
53
54
with :
54
55
tag : ${{ inputs.tag }}
55
56
image : ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
@@ -156,26 +157,19 @@ jobs:
156
157
chain-specs :
157
158
needs : build-pc-artifacts
158
159
uses : ./.github/workflows/modules/chain-specs.yml
159
- permissions :
160
- id-token : write
161
- contents : write
162
160
with :
163
161
sha : ${{ inputs.sha }}
164
162
tag : ${{ inputs.tag }}
165
163
166
164
deploy-staging-preview :
167
165
needs : chain-specs
168
166
uses : ./.github/workflows/modules/staging-preview-deploy.yml
169
- permissions :
170
- id-token : write
171
- contents : write
172
167
with :
173
168
image : ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
174
169
chain-spec-secret : staging-chain-spec-${{ inputs.sha }}
175
170
176
171
build-and-publish-ghcr-image :
177
172
uses : ./.github/workflows/modules/build-and-publish-ghcr-image.yml
178
173
with :
179
- commit_sha : ${{ inputs.sha }}
180
- ghcr_tag : ${{ inputs.tag }}
181
- publish_to_ghcr : true
174
+ sha : ${{ inputs.sha }}
175
+ tag : ${{ inputs.tag }}
Original file line number Diff line number Diff line change @@ -3,32 +3,24 @@ name: Build and Publish to GHCR
3
3
on :
4
4
workflow_call :
5
5
inputs :
6
- commit_sha :
6
+ sha :
7
7
description : ' Commit SHA to build from'
8
8
required : true
9
9
type : string
10
- ghcr_tag :
10
+ tag :
11
11
description : " Tag for GHCR image"
12
12
required : true
13
13
type : string
14
- publish_to_ghcr :
15
- description : " Publish to GitHub Container Registry"
16
- default : true
17
- type : boolean
18
14
workflow_dispatch :
19
15
inputs :
20
- commit_sha :
16
+ sha :
21
17
description : ' Commit SHA to build from'
22
18
required : true
23
19
type : string
24
- ghcr_tag :
20
+ tag :
25
21
description : " Tag for GHCR image"
26
22
required : true
27
23
type : string
28
- publish_to_ghcr :
29
- description : " Publish to GitHub Container Registry"
30
- default : true
31
- type : boolean
32
24
33
25
env :
34
26
SSH_AUTH_SOCK : /tmp/ssh_agent.sock
44
36
- name : Checkout
45
37
uses : actions/checkout@v4
46
38
with :
47
- ref : ${{ inputs.commit_sha }}
39
+ ref : ${{ inputs.sha }}
48
40
49
41
- name : Setup Earthly
50
42
uses : ./.github/earthly-setup
@@ -112,7 +104,6 @@ jobs:
112
104
done
113
105
114
106
- name : Main Build
115
- if : ${{ inputs.publish_to_ghcr }}
116
107
env :
117
108
EARTHLY_CI : true
118
109
EARTHLY_PUSH : false
@@ -134,8 +125,8 @@ jobs:
134
125
run : |
135
126
repository_name="${GITHUB_REPOSITORY##*/}"
136
127
target_image="ghcr.io/${{ github.repository }}/$repository_name-node"
137
- commit_sha="${{ inputs.commit_sha }}"
138
- custom_tag="${{ inputs.ghcr_tag }}"
128
+ commit_sha="${{ inputs.sha }}"
129
+ custom_tag="${{ inputs.tag }}"
139
130
140
131
docker tag ghcr-image:latest $target_image:latest
141
132
docker tag ghcr-image:latest $target_image:$commit_sha
You can’t perform that action at this time.
0 commit comments