1+ name : EigenDA Docker Image
2+
3+ inputs :
4+ context :
5+ required : true
6+ type : string
7+ images :
8+ required : true
9+ type : string
10+ target :
11+ required : true
12+ type : string
13+ platforms :
14+ required : true
15+ type : string
16+ file :
17+ required : true
18+ type : string
19+ push :
20+ required : true
21+ type : boolean
22+
23+ outputs :
24+ digest :
25+ value : " ${{ steps.build.outputs.digest }}"
26+
27+ runs :
28+ using : composite
29+ steps :
30+ - name : Generate docker metadata
31+ uses : docker/metadata-action@v5
32+ id : metadata
33+ with :
34+ images : ${{ inputs.images }}
35+ - name : Build and push docker
36+ uses : docker/build-push-action@v5
37+ id : build
38+ with :
39+ context : ${{ inputs.context }}
40+ file : ${{ inputs.file }}
41+ target : ${{ inputs.target }}
42+ labels : ${{ steps.metadata.outputs.labels }}
43+ platforms : ${{ inputs.platforms }}
44+ cache-from : type=registry,ref=${{ steps.metadata.outputs.tags }}
45+ cache-to : type=inline
46+ outputs : type=image,name=${{ inputs.images }},push-by-digest=true,name-canonical=true,push=${{ inputs.push }}
47+
48+ - name : Export digest
49+ shell : bash
50+ run : |
51+ digest_dir="${{ runner.temp }}/${{ inputs.target }}-${{ github.run_number }}-digests"
52+ mkdir -p "${digest_dir}"
53+ digest="${{ steps.build.outputs.digest }}"
54+ touch "${digest_dir}/${digest#sha256:}"
55+
56+ - name : Upload digest to arm64
57+ if : ${{ matrix.platform == 'linux/arm64' }}
58+ uses : actions/upload-artifact@v4
59+ with :
60+ name : " ${{ inputs.target }}-digests-${{ github.run_number }}-arm64"
61+ path : " ${{ runner.temp }}/${{ inputs.target }}-${{ github.run_number }}-digests/*"
62+ if-no-files-found : error
63+ retention-days : 1
64+
65+ - name : Upload digest to amd64
66+ if : ${{ matrix.platform == 'linux/amd64' }}
67+ uses : actions/upload-artifact@v4
68+ with :
69+ name : " ${{ inputs.target }}-digests-${{ github.run_number }}-amd64"
70+ path : " ${{ runner.temp }}/${{ inputs.target }}-${{ github.run_number }}-digests/*"
71+ if-no-files-found : error
72+ retention-days : 1
0 commit comments