@@ -3,17 +3,21 @@ name: golden-container-images-docker-build-rust
33on :
44 workflow_dispatch :
55 inputs :
6- push_image :
7- description : ' Push the image to the registry'
6+ push-image :
7+ description : " Push the image to the registry"
88 default : true
99 required : true
1010 type : boolean
1111 tag :
12- description : ' Tag to use for the image'
13- default : ' latest'
14- required : true
12+ description : " Tag to use for the image"
13+ default : " "
14+ required : false
15+ type : string
16+ rust-version :
17+ description : " The rust version to use"
18+ default : " stable"
19+ required : false
1520 type : string
16- pull_request :
1721
1822permissions : {}
1923
@@ -22,58 +26,9 @@ concurrency:
2226 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
2327
2428jobs :
25- check-changes :
26- name : golden-container-images-docker-build-rust/check-changes
27- permissions :
28- actions : ' read' # Required to read workflow run information
29- contents : ' read' # Required to checkout repository code
30- pull-requests : ' read' # Required to read pull request information
31- runs-on : ubuntu-latest
32- outputs :
33- changes-golden-rust : ${{ steps.filter.outputs.golden-rust }}
34- steps :
35- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36- with :
37- persist-credentials : ' false'
38- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
39- id : filter
40- with :
41- filters : |
42- golden-rust:
43- - '.github/workflows/golden-container-images-docker-build-rust.yml'
44- - 'golden-container-images/rust-glibc/**'
45- - toolchain.txt
46- determine-tag :
47- name : golden-container-images-docker-build-rust/determine-tag
48- permissions :
49- actions : ' read' # Required to read workflow run information
50- contents : ' read' # Required to checkout repository code
51- pull-requests : ' read' # Required to read pull request information
52- runs-on : ubuntu-latest
53- outputs :
54- tag : ${{ steps.set-tag.outputs.tag }}
55- steps :
56- - name : Checkout Project
57- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58- with :
59- persist-credentials : ' false'
60- - id : set-tag
61- env :
62- TAG : ${{ github.event.inputs.tag }}
63- WORKSPACE : ${{ github.workspace }}
64- run : |
65- if [[ -n "${TAG}" ]]; then
66- echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
67- else
68- if [[ -f "${WORKSPACE}/toolchain.txt" ]]; then
69- echo "tag=$(cat "${WORKSPACE}"/toolchain.txt)" >> "$GITHUB_OUTPUT"
70- fi
71- fi
7229 build :
73- name : golden-container-images-docker-build-rust/build
74- needs : [check-changes, determine-tag]
75- if : ${{ needs.check-changes.outputs.changes-golden-rust == 'true' }}
76- uses : zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
30+ needs : [check-changes]
31+ uses : zama-ai/ci-templates/.github/workflows/common-docker.yml@2c18213b2c10eb90a0ca17f23c12a72fb732c9eb # TODO: update this when merged: v1.0.1
7732 secrets :
7833 AWS_ACCESS_KEY_S3_USER : ${{ secrets.AWS_ACCESS_KEY_S3_USER }}
7934 AWS_SECRET_KEY_S3_USER : ${{ secrets.AWS_SECRET_KEY_S3_USER }}
9045 with :
9146 use-cgr-secrets : true
9247 working-directory : " ."
93- push_image : ${{ github.event_name == 'workflow_dispatch' && github. event.inputs.push_image == 'true' || github.event_name != 'workflow_dispatch' && true }}
48+ push-image : ${{ github.event.inputs.push-image }}
9449 image-name : " fhevm/gci/rust-glibc"
95- image-tag : ${{ needs.determine-tag.outputs.tag }}
50+ image-tag : ${{ github.event.inputs.tag }}
51+ rust-version : ${{ github.event.inputs.rust-version }}
9652 docker-file : " ./golden-container-images/rust-glibc/Dockerfile"
9753 app-cache-dir : " fhevm-golden-rust"
9854 ref : ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', github.event.inputs.tag) || '' }}
0 commit comments