feat(docker): support dynamic tag based on commit SHA
Some checks failed
Docker CI/CD / Docker Build and Push (push) Failing after 1m34s
Some checks failed
Docker CI/CD / Docker Build and Push (push) Failing after 1m34s
Enhanced Docker build workflows in `.forgejo/workflows/docker-latest.yml` to include dynamic tagging based on the GITHUB_SHA, alongside the existing 'latest' tag for both the kumitterer/matrix-gptbot and git.private.coffee/privatecoffee/matrix-gptbot images. This change allows for more precise versioning and traceability of images, facilitating rollback and specific version deployment. Also standardized authentication token variables for Docker login to the Forgejo Docker Registry, improving readability and consistency in CI/CD configurations.
This commit is contained in:
parent
35254a0b49
commit
f049285cb1
1 changed files with 10 additions and 4 deletions
|
@ -28,15 +28,21 @@ jobs:
|
|||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: kumitterer/matrix-gptbot:latest
|
||||
tags: |
|
||||
kumitterer/matrix-gptbot:latest
|
||||
kumitterer/matrix-gptbot:${{ GITHUB_SHA }}
|
||||
- name: Log in to Forgejo Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.private.coffee
|
||||
username: ${{ secrets.GITHUB_ACTOR }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
username: ${{ GITHUB_ACTOR }}
|
||||
password: ${{ GITHUB_TOKEN }}
|
||||
- name: Build and push to Forgejo Docker Registry
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: git.private.coffee/privatecoffee/matrix-gptbot:latest
|
||||
tags: |
|
||||
git.private.coffee/privatecoffee/matrix-gptbot:latest
|
||||
|
|
||||
git.private.coffee/privatecoffee/matrix-gptbot:latest
|
||||
git.private.coffee/privatecoffee/matrix-gptbot:${{ GITHUB_SHA }}
|
||||
|
|
Loading…
Reference in a new issue