Skip to content

Commit aabd85d

Browse files
committed
fix missing web commit in followup steps
1 parent e9d423f commit aabd85d

File tree

5 files changed

+47
-6
lines changed

5 files changed

+47
-6
lines changed

.github/workflows/build_commit_web.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
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
@@ -91,6 +94,15 @@ jobs:
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 }}

.github/workflows/publish_docker_matrix.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,32 @@ name: Docker Image Publish Matrix (All)
33
on:
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

1722
jobs:
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 }}

.github/workflows/publish_docker_matrix_alpine.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Alpine)
33
on:
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
813
permissions:
@@ -31,6 +36,7 @@ jobs:
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

.github/workflows/publish_docker_matrix_debian.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Debian)
33
on:
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
813
permissions:
@@ -30,6 +35,7 @@ jobs:
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

.github/workflows/publish_docker_matrix_ubuntu.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Docker Image Publish Matrix (Ubuntu)
33
on:
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
813
permissions:
@@ -29,6 +34,7 @@ jobs:
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

0 commit comments

Comments
 (0)