Renamed GITHUB_TOKEN to GH_TOKEN because for some reason secret names starting with GITHUB are not allowed
38 lines
813 B
YAML
38 lines
813 B
YAML
name: Docker Build and Push
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
concurrency:
|
|
group: "docker-image"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- 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: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
|
platforms: linux/amd64,linux/arm64
|
|
|