feat(workflows): streamline Docker CI/CD processes
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 5m34s
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 5m34s
Removed redundant internal Docker CI/CD workflow and unified naming for external Docker workflows to improve clarity and maintainability. Introduced a new workflow for tagging pushes, aligning deployments closer with best practices for version management and distribution. This change simplifies the CI/CD pipeline, reducing duplication and potential confusion, while ensuring that Docker images are built and pushed efficiently for both internal developments and tagged releases. - Docker CI/CD internals were removed, focusing efforts on standardized workflows. - Docker CI/CD workflow names were harmonized to reinforce their universal role across projects. - A new tagging workflow supports better version control and facilitates automatic releases to Docker Hub, promoting consistency and reliability in image distribution. This adjustment lays the groundwork for more streamlined and robust CI/CD operations, providing a solid framework for future enhancements and scalability.
This commit is contained in:
parent
fc26f4b591
commit
eb9312099a
3 changed files with 32 additions and 35 deletions
|
@ -1,34 +0,0 @@
|
|||
name: Docker CI/CD Internal
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "docker"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Docker Build and Push to Forgejo Docker Registry
|
||||
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: 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 }}
|
|
@ -1,4 +1,4 @@
|
|||
name: Docker CI/CD External
|
||||
name: Docker CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
31
.forgejo/workflows/docker-tag.yml
Normal file
31
.forgejo/workflows/docker-tag.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Docker CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
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:${{ env.GITHUB_REF_NAME }}
|
Loading…
Reference in a new issue