2023-03-09 01:09:52 +00:00
|
|
|
name: Publish Docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up QEMU
|
2024-12-17 13:58:55 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-03-09 01:09:52 +00:00
|
|
|
- name: Set up Docker Buildx
|
2024-12-17 13:59:00 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-03-09 01:09:52 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Docker Labels
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
images: |
|
2023-03-09 01:24:53 +00:00
|
|
|
cupcakearmy/gitea-sync
|
|
|
|
# ghcr.io/${{ github.repository }}
|
2023-03-09 01:09:52 +00:00
|
|
|
# This assumes your repository is also github.com/foo/bar
|
|
|
|
# You could also use ghcr.io/foo/some-package as long as you are the user/org "foo"
|
|
|
|
tags: |
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
|
2023-03-09 01:24:53 +00:00
|
|
|
- name: Log in to Docker Hub
|
2024-12-17 13:58:53 +00:00
|
|
|
uses: docker/login-action@v3
|
2023-03-09 01:09:52 +00:00
|
|
|
with:
|
2023-03-09 01:24:53 +00:00
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
# - name: Log in to the Container registry
|
2024-12-17 13:58:53 +00:00
|
|
|
# uses: docker/login-action@v3
|
2023-03-09 01:24:53 +00:00
|
|
|
# with:
|
|
|
|
# registry: ghcr.io
|
|
|
|
# username: ${{ github.actor }}
|
|
|
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
2023-03-09 01:09:52 +00:00
|
|
|
|
|
|
|
- name: Build and push
|
2024-12-17 13:58:58 +00:00
|
|
|
uses: docker/build-push-action@v6
|
2023-03-09 01:09:52 +00:00
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|