fix: correctly pass git commit to docker build
All checks were successful
Build and Push Server / build-and-push (push) Successful in 2m56s
All checks were successful
Build and Push Server / build-and-push (push) Successful in 2m56s
This commit is contained in:
@@ -70,12 +70,7 @@ jobs:
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
# Step 8: Get the short commit SHA to use as an image tag.
|
||||
- name: Get short commit hash
|
||||
id: commit
|
||||
run: echo "sha_short=$(echo ${{ gitea.sha }} | cut -c1-7)" >> $GITEA_OUTPUT
|
||||
|
||||
# Step 9: Build the Docker image and push it to the Gitea registry.
|
||||
# Step 8: Build the Docker image and push it to the Gitea registry.
|
||||
# The image is tagged with 'latest' and the short commit SHA.
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
@@ -85,6 +80,6 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
git.max-richter.dev/${{ gitea.repository }}:latest
|
||||
git.max-richter.dev/${{ gitea.repository }}:${{ steps.commit.outputs.sha_short }}
|
||||
git.max-richter.dev/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
build-args: |
|
||||
GIT_COMMIT=${{ gitea.commit_sha }}
|
||||
GIT_COMMIT=${{ gitea.sha }}
|
||||
|
||||
Reference in New Issue
Block a user