Skip to content

ci: update Docker CI/CD pipeline configuration #14

ci: update Docker CI/CD pipeline configuration

ci: update Docker CI/CD pipeline configuration #14

Workflow file for this run

name: Docker Build and Push
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: mountaingod2/chaturbate_poller
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
context: git
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
mountaingod2/chaturbate_poller:latest
mountaingod2/chaturbate_poller
ghcr.io/mountaingod2/chaturbate_poller:latest
ghcr.io/mountaingod2/chaturbate_poller:${{ steps.meta.outputs.tags }}