matrix-gptbot/.forgejo/workflows/docker-latest.yml
Kumi 5bc6344fdf
Some checks failed
Docker CI/CD / Docker Build and Push (push) Failing after 5m59s
fix(docker): streamline tag format for latest image
Removed a duplicate and unnecessary line specifying the `latest` tag for the docker image in the workflow. This change simplifies the tag specification process, avoiding redundancy, and ensuring clear declaration of both the `latest` and SHA-specific tags for our docker images in CI/CD pipelines.
2024-04-23 10:52:09 +02:00

46 lines
1.3 KiB
YAML

name: Docker CI/CD
on:
push:
branches:
- "docker"
jobs:
docker:
name: Docker Build and Push
container:
image: node:20-bookworm
steps:
- name: Install dependencies
run: |
apt update
apt install -y docker.io
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
kumitterer/matrix-gptbot:latest
kumitterer/matrix-gptbot:${{ env.GITHUB_SHA }}
- name: Log in to Forgejo Docker Registry
uses: docker/login-action@v3
with:
registry: git.private.coffee
username: ${{ env.GITHUB_ACTOR }}
password: ${{ env.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
git.private.coffee/privatecoffee/matrix-gptbot:${{ env.GITHUB_SHA }}