docker-ddns-cloudflare/.github/workflows/docker.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2022-10-20 13:18:57 +00:00
name: Publish Docker image
2021-05-05 10:10:29 +00:00
on:
2022-10-20 13:18:57 +00:00
release:
types: [published]
2021-05-05 10:10:29 +00:00
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
2022-10-20 13:18:57 +00:00
uses: docker/setup-qemu-action@v2
2021-05-05 10:10:29 +00:00
- name: Set up Docker Buildx
2022-10-20 13:18:57 +00:00
uses: docker/setup-buildx-action@v2
with:
install: true
2021-05-05 10:10:29 +00:00
- name: Docker Labels
id: meta
2022-10-20 13:18:57 +00:00
uses: docker/metadata-action@v4
2021-05-05 10:10:29 +00:00
with:
2022-10-20 13:18:57 +00:00
images: |
cupcakearmy/ddns-cloudflare
ghcr.io/${{ github.repository }}
2021-05-05 10:10:29 +00:00
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
2022-10-20 13:18:57 +00:00
- name: Log in to Docker Hub
uses: docker/login-action@v2
2021-05-05 10:10:29 +00:00
with:
2022-10-20 13:18:57 +00:00
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2021-05-05 10:10:29 +00:00
- name: Build and push
2022-10-20 13:18:57 +00:00
uses: docker/build-push-action@v3
2021-05-05 10:10:29 +00:00
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}