Skip to content

Commit b99b003

Browse files
fix: Update Docker image tags to use branch names instead of SHA
1 parent 57c416f commit b99b003

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
18+
- name: Set image tags
19+
id: meta
20+
run: |
21+
BRANCH_NAME=${GITHUB_REF##*/}
22+
echo "branch_tag=${BRANCH_NAME//\//-}" >> "$GITHUB_OUTPUT"
1823
1924
# 1. QEMU setup for cross-platform emulation
2025
- name: Set up QEMU
@@ -45,10 +50,12 @@ jobs:
4550
push: true
4651
tags: |
4752
ghcr.io/${{ github.repository }}:latest-gpu
48-
ghcr.io/${{ github.repository }}:${{ github.sha }}-gpu
53+
ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.branch_tag }}-gpu
4954
build-args: |
50-
BASE_IMAGE=tensorflow/tensorflow:2.9.2-gpu
51-
55+
BUILD_TYPE=gpu
56+
PY_VER=3.10
57+
TF_VER=2.9.2
58+
CUDA_TAG=11.2.2-cudnn8-runtime-ubuntu20.04
5259
# 4. Multi-arch CPU image
5360
- name: Build and push CPU Docker image
5461
uses: docker/build-push-action@v6
@@ -59,6 +66,8 @@ jobs:
5966
push: true
6067
tags: |
6168
ghcr.io/${{ github.repository }}:latest-cpu
62-
ghcr.io/${{ github.repository }}:${{ github.sha }}-cpu
69+
ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.branch_tag }}-cpu
6370
build-args: |
64-
BASE_IMAGE=tensorflow/tensorflow:2.9.2
71+
BUILD_TYPE=cpu
72+
PY_VER=3.10
73+
TF_VER=2.9.2

0 commit comments

Comments
 (0)