File tree Expand file tree Collapse file tree 5 files changed +47
-6
lines changed Expand file tree Collapse file tree 5 files changed +47
-6
lines changed Original file line number Diff line number Diff line change 88 build :
99 runs-on : ubuntu-latest
1010
11+ outputs :
12+ tcw_commit_hash : ${{ steps.get_commit_hash.outputs.commit_hash }}
13+
1114 steps :
1215 - name : Checkout code
1316 uses : actions/checkout@v4
9194 echo "No changes to commit and push."
9295 fi
9396
97+ - name : Get Last Commit Hash
98+ id : get_commit_hash
99+ run : echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_ENV
100+
101+ - name : Wait for a few seconds # to avoid missing commit in followup steps
102+ run : sleep 10
103+
94104 build_docker :
95105 needs : build
96- uses : ./.github/workflows/publish_docker_matrix.yml
106+ uses : ./.github/workflows/publish_docker_matrix.yml
107+ with :
108+ tcw_commit_hash : ${{ needs.build.outputs.tcw_commit_hash }}
Original file line number Diff line number Diff line change @@ -3,21 +3,32 @@ name: Docker Image Publish Matrix (All)
33on :
44 workflow_dispatch :
55 workflow_call :
6+ inputs :
7+ tcw_commit_hash :
8+ description : " Commit hash from the teddycloud_web build job"
9+ type : string
10+ required : false
611
712 push :
813 branches :
9- - master
10- - develop
14+ - master
15+ - develop
1116 tags :
12- - tc_nightly*
13- - tc_v*.*.*
17+ - tc_nightly*
18+ - tc_v*.*.*
1419 pull_request :
15- branches : [ "master", "develop" ]
20+ branches : ["master", "develop"]
1621
1722jobs :
1823 debian :
1924 uses : ./.github/workflows/publish_docker_matrix_debian.yml
25+ with :
26+ tcw_commit_hash : ${{ inputs.tcw_commit_hash }}
2027 ubuntu :
2128 uses : ./.github/workflows/publish_docker_matrix_ubuntu.yml
29+ with :
30+ tcw_commit_hash : ${{ inputs.tcw_commit_hash }}
2231 alpine :
2332 uses : ./.github/workflows/publish_docker_matrix_alpine.yml
33+ with :
34+ tcw_commit_hash : ${{ inputs.tcw_commit_hash }}
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Alpine)
33on :
44 workflow_dispatch :
55 workflow_call :
6+ inputs :
7+ tcw_commit_hash :
8+ description : " Commit hash from the teddycloud_web build job"
9+ type : string
10+ required : false
611
712# permissions are needed if pushing to ghcr.io
813permissions :
3136 - uses : actions/checkout@v4
3237 with :
3338 submodules : recursive
39+ ref : ${{ inputs.tcw_commit_hash || 'HEAD' }}
3440 - name : Set up QEMU
3541 uses : docker/setup-qemu-action@v3
3642 - name : Set up Docker Buildx
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Debian)
33on :
44 workflow_dispatch :
55 workflow_call :
6+ inputs :
7+ tcw_commit_hash :
8+ description : " Commit hash from the teddycloud_web build job"
9+ type : string
10+ required : false
611
712# permissions are needed if pushing to ghcr.io
813permissions :
3035 - uses : actions/checkout@v4
3136 with :
3237 submodules : recursive
38+ ref : ${{ inputs.tcw_commit_hash || 'HEAD' }}
3339 - name : Set up QEMU
3440 uses : docker/setup-qemu-action@v3
3541 - name : Set up Docker Buildx
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Ubuntu)
33on :
44 workflow_dispatch :
55 workflow_call :
6+ inputs :
7+ tcw_commit_hash :
8+ description : " Commit hash from the teddycloud_web build job"
9+ type : string
10+ required : false
611
712# permissions are needed if pushing to ghcr.io
813permissions :
2934 - uses : actions/checkout@v4
3035 with :
3136 submodules : recursive
37+ ref : ${{ inputs.tcw_commit_hash || 'HEAD' }}
3238 - name : Set up QEMU
3339 uses : docker/setup-qemu-action@v3
3440 - name : Set up Docker Buildx
You can’t perform that action at this time.
0 commit comments