refactor(ci): streamline Docker CI/CD workflows
Removed redundant Docker CI/CD workflow for the 'latest' tag and integrated its functionality into the existing tagging workflow. This change not only reduces the redundancy of having separate workflows for 'latest' and version-specific tags but also simplifies the CI/CD process by having a single, unified workflow for Docker image publications. Moving forward, every push will now ensure that the 'latest' tag is updated alongside the version-specific tags, maintaining a smoother and more predictable deployment and versioning flow.
This commit is contained in:
parent
9c6b6f5b99
commit
47bf7db380
2 changed files with 3 additions and 34 deletions
|
@ -1,33 +0,0 @@
|
||||||
name: Docker CI/CD
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
name: Docker Build and Push to Docker Hub
|
|
||||||
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 }}
|
|
|
@ -28,4 +28,6 @@ jobs:
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: kumitterer/matrix-gptbot:${{ env.GITHUB_REF_NAME }}
|
tags: |
|
||||||
|
kumitterer/matrix-gptbot:latest
|
||||||
|
kumitterer/matrix-gptbot:${{ env.GITHUB_REF_NAME }}
|
||||||
|
|
Loading…
Reference in a new issue