Files
opencode-dispatch/.gitea/workflows/docker-build.yaml
T
cloudix_mcp_server f4f5a42a39 refactor: migrate CI pipeline to use semantic version tags for actions
- Replace pinned SHA action versions with maintainable semantic version tags
- Add QEMU setup for multi-arch builds
- Simplify conditionals and improve readability
- Clean up tag strategy with metadata action
2026-06-12 19:56:06 -04:00

49 lines
1.2 KiB
YAML

name: Docker Build and Push
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: jcabillot/opencode-dispatch
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}