1717 description : Override target docker tag (defaults to the above source ref if left blank)
1818 type : string
1919 required : false
20+ build_args :
21+ description : Build arguments to pass to the docker build command
22+ type : string
23+ required : false
2024
2125jobs :
2226 prepare :
5155 - uses : ./.github/actions/install-deps
5256 with :
5357 repository : ${{ inputs.repository }}
58+ # Check out source repository to get commit hash
59+ - name : Check out source repository
60+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+ with :
62+ repository : ${{ inputs.repository }}
63+ path : source
64+ ref : ${{ inputs.ref }}
65+ fetch-depth : 0
66+ # Get the git commit hash before using it
67+ - name : Get git commit hash
68+ id : get_commit_hash
69+ run : |
70+ cd source
71+ echo "git_commit_hash=$(git log --pretty=format:'%h' -n 1 --abbrev=7)" >> $GITHUB_OUTPUT
72+ shell : bash
5473 - uses : ./.github/actions/deploy
5574 id : deploy
5675 with :
@@ -59,20 +78,20 @@ jobs:
5978 target_tag : ${{ needs.prepare.outputs.target_tag }}-${{ matrix.slug }}
6079 target_repository : ethpandaops/mev-boost-relay
6180 platform : ${{ matrix.platform }}
62-
81+ build_args : ${{ inputs.build_args || format('VERSION={0}-{1}', inputs.ref, steps.get_commit_hash.outputs.git_commit_hash) }}
6382 DOCKER_USERNAME : " ${{ vars.DOCKER_USERNAME }}"
6483 DOCKER_PASSWORD : " ${{ secrets.DOCKER_PASSWORD }}"
6584 MACOS_PASSWORD : " ${{ secrets.MACOS_PASSWORD }}"
6685 GOPROXY : " ${{ vars.GOPROXY }}"
6786 HARBOR_USERNAME : " ${{ vars.HARBOR_USERNAME }}"
6887 HARBOR_PASSWORD : " ${{ secrets.HARBOR_PASSWORD }}"
6988 harbor_registry : ${{ vars.HARBOR_REGISTRY }}
70-
71- # This step captures the git commit hash from the deploy action for job output
89+ # This step captures the git commit hash for job output
7290 - name : Set job output
7391 id : set_output
74- run : echo "git_commit_hash=${{ steps.deploy .outputs.git_commit_hash }}" >> $GITHUB_OUTPUT
92+ run : echo "git_commit_hash=${{ steps.get_commit_hash .outputs.git_commit_hash }}" >> $GITHUB_OUTPUT
7593 shell : bash
94+
7695 manifest :
7796 needs :
7897 - prepare
0 commit comments