Skip to content

Commit e84384e

Browse files
committed
Tag Python versions with commit SHA used to generate
1 parent 99c66e1 commit e84384e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build-version.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Build Python Version
2+
13
on:
24
workflow_call:
35
inputs:
@@ -29,12 +31,18 @@ jobs:
2931
username: ${{ github.repository_owner }}
3032
password: ${{ secrets.GITHUB_TOKEN }}
3133

34+
- name: Get Git commit short SHA
35+
id: git-sha
36+
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
37+
3238
- name: Build and push Docker image
3339
uses: docker/build-push-action@v6
3440
with:
3541
context: .
3642
file: ./Dockerfile
3743
push: true
38-
tags: ghcr.io/python-discord/python-builds:${{ inputs.tag }}
44+
tags: |
45+
ghcr.io/python-discord/python-builds:${{ inputs.tag }}
46+
ghcr.io/python-discord/python-builds:${{ inputs.tag }}-${{ steps.git-sha.outputs.sha }}
3947
build-args: |
4048
PYTHON_VERSION=${{ inputs.version }}

0 commit comments

Comments
 (0)