6
6
commit_sha :
7
7
description : |
8
8
SHA of the commit on which the mithril binaries should be obtained, a "ci.yml" workflow must have run
9
- on it else no binary would be available leading to the failure of this.
10
-
11
- If not provided the last commit on the main branch will be used instead.
12
- required : false
9
+ on it otherwise no binary would be available leading to the failure of this workflow.
10
+ required : true
13
11
type : string
14
12
cardano_bin_url :
15
- description : The url of the archive of the Cardano Node/CLI binaries
13
+ description : The url of the archive of the Cardano binaries
16
14
required : true
17
15
type : string
18
16
default : https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.5-linux.tar.gz
19
17
dry_run :
20
18
description : Dry run will not push the Docker images to the registry
21
19
required : true
22
20
type : boolean
23
- default : false
21
+ default : true
24
22
25
23
jobs :
26
24
build-push-docker :
31
29
project : [ mithril-aggregator, mithril-client, mithril-signer ]
32
30
33
31
permissions :
34
- contents : read
35
- packages : write
32
+ contents : read
36
33
37
34
env :
38
35
REGISTRY : ghcr.io
@@ -42,26 +39,19 @@ jobs:
42
39
GITHUB_REF : ${{ github.ref}}
43
40
44
41
steps :
45
- - name : Prepare environment variables
46
- id : prepare
47
- shell : bash
48
- run : |
49
- if [[ -n "${{ inputs.commit_sha }}" ]]; then
50
- echo "sha=${{ inputs.commit_sha }}" >> $GITHUB_OUTPUT
51
- else
52
- echo "branch=main" >> $GITHUB_OUTPUT
53
- fi
54
-
55
- - name : Checkout
42
+ - name : Checkout repository
56
43
uses : actions/checkout@v3
57
44
58
- - name : Checkout binary
45
+ - name : Checkout commit
46
+ run : |
47
+ git checkout ${{ inputs.commit_sha }}
48
+
49
+ - name : Download built artifacts (Linux-x64)
59
50
uses : dawidd6/action-download-artifact@v2
60
51
with :
61
- name : mithril-distribution-${{ runner.os }}-${{ runner.arch }}
62
- path : ./bin
63
- commit : ${{ steps.prepare.outputs.sha }}
64
- branch : ${{ steps.prepare.outputs.branch }}
52
+ name : mithril-distribution-Linux-X64
53
+ path : ${{ matrix.project }}
54
+ commit : ${{ inputs.commit_sha }}
65
55
workflow : ci.yml
66
56
workflow_conclusion : success
67
57
@@ -79,23 +69,13 @@ jobs:
79
69
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
80
70
tags : |
81
71
test
82
- type=raw,value=test-${{ github.ref_name }}-{{ steps.prepare.outputs.sha }}
83
-
84
- - name : Download built artifacts (Linux-x64)
85
- uses : dawidd6/action-download-artifact@v2
86
- with :
87
- name : mithril-distribution-Linux-X64
88
- path : ${{ matrix.project }}
89
- commit : ${{ steps.prepare.outputs.sha }}
90
- workflow : ci.yml
91
- workflow_conclusion : success
72
+ type=raw,value=test-${{ inputs.commit_sha }}
92
73
93
74
- name : Build and push Docker image
94
75
uses : docker/build-push-action@v3
95
- if : ${{ inputs.dry_run }} == 'false'
96
76
with :
97
77
context : ${{ env.CONTEXT }}
98
78
file : ${{ env.DOCKER_FILE }}
99
- build-args : CARDANO_BIN_URL=${{ steps. inputs.cardano_bin_url }}
100
- push : true
79
+ build-args : CARDANO_BIN_URL=${{ inputs.cardano_bin_url }}
80
+ push : ${{ inputs.dry_run == 'false' }}
101
81
tags : ${{ steps.meta.outputs.tags }}
0 commit comments