mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 03:02:50 +01:00
a434fc7cb1
The actual code was included in the previous
97a50a23d2
by accident …
This commit only wraps the slightly more complex docker.yml condition
in GitHub's special ${{ … }} braces.
70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: Docker Images
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- v[0-9]+.[0-9]+.[0-9]+
|
|
|
|
|
|
permissions:
|
|
packages: write
|
|
|
|
concurrency:
|
|
group: docker
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# on release commits, run only for tag event
|
|
if: ${{
|
|
github.repository == 'mikf/gallery-dl' &&
|
|
( ! startsWith( github.event.head_commit.message , 'release version ' ) ||
|
|
startsWith( github.ref , 'refs/tags/v' ) )
|
|
}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/metadata-action@v5
|
|
id: metadata
|
|
with:
|
|
images: |
|
|
mikf123/gallery-dl
|
|
ghcr.io/mikf/gallery-dl
|
|
tags: |
|
|
type=ref,event=tag
|
|
type=raw,value=dev
|
|
type=sha,format=long,prefix=
|
|
type=raw,priority=500,value={{date 'YYYY.MM.DD'}}
|
|
|
|
- uses: docker/setup-qemu-action@v3
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
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.GHCR_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.metadata.outputs.tags }}
|
|
labels: ${{ steps.metadata.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|