diff --git a/.forgejo/workflows/docker-internal.yml b/.forgejo/workflows/docker-internal.yml deleted file mode 100644 index 6ce8a19..0000000 --- a/.forgejo/workflows/docker-internal.yml +++ /dev/null @@ -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 }} diff --git a/.forgejo/workflows/docker-latest.yml b/.forgejo/workflows/docker-latest.yml index 38dfe78..4b1c517 100644 --- a/.forgejo/workflows/docker-latest.yml +++ b/.forgejo/workflows/docker-latest.yml @@ -1,4 +1,4 @@ -name: Docker CI/CD External +name: Docker CI/CD on: push: diff --git a/.forgejo/workflows/docker-tag.yml b/.forgejo/workflows/docker-tag.yml new file mode 100644 index 0000000..cadf570 --- /dev/null +++ b/.forgejo/workflows/docker-tag.yml @@ -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 }}