mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
[docker] update workflow
- run on every push to master - build images from GitHub source instead of PyPI package - build arm64 image (#5227) - include more tags - build date as 'YYYYMMDD' - 'dev' for most recent build from master - 'latest' for most recent release build
This commit is contained in:
parent
96af12cec2
commit
36fc510d3a
60
.github/workflows/docker.yml
vendored
60
.github/workflows/docker.yml
vendored
@ -1,33 +1,47 @@
|
|||||||
name: docker
|
name: Docker Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
tags:
|
tags:
|
||||||
- v[0-9]+.[0-9]+.[0-9]+
|
- v[0-9]+.[0-9]+.[0-9]+
|
||||||
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: docker
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# on release commits, run only for tag event
|
||||||
|
if: ${{ ! startsWith( github.event.head_commit.message , 'release version ' ) || startsWith( github.ref , 'refs/tags/v' ) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# https://github.com/docker/setup-buildx-action
|
- uses: docker/metadata-action@v5
|
||||||
- name: Set up Docker Buildx
|
id: metadata
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
# https://github.com/docker/login-action
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
images: |
|
||||||
username: ${{ github.repository_owner }}
|
mikf123/gallery-dl
|
||||||
password: ${{ secrets.GHCR_TOKEN }}
|
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 'YYYYMMDD'}}
|
||||||
|
|
||||||
|
- uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -35,23 +49,17 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
# https://github.com/docker/metadata-action
|
- name: Login to GitHub Container Registry
|
||||||
- name: Generate Docker tags
|
uses: docker/login-action@v3
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
id: metadata
|
|
||||||
with:
|
with:
|
||||||
images: |
|
registry: ghcr.io
|
||||||
mikf123/gallery-dl
|
username: ${{ github.repository_owner }}
|
||||||
ghcr.io/mikf/gallery-dl
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
tags: |
|
|
||||||
type=sha,format=long,prefix=
|
|
||||||
type=ref,event=tag
|
|
||||||
|
|
||||||
# https://github.com/docker/build-push-action
|
- uses: docker/build-push-action@v5
|
||||||
- name: Build image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.metadata.outputs.tags }}
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
labels: ${{ steps.metadata.outputs.labels }}
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
@ -11,7 +11,7 @@ RUN : \
|
|||||||
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
|
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
|
||||||
pip \
|
pip \
|
||||||
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
|
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
|
||||||
gallery-dl \
|
https://github.com/mikf/gallery-dl/archive/refs/heads/master.tar.gz \
|
||||||
yt-dlp \
|
yt-dlp \
|
||||||
&& rm -rf /root/.cache/pip \
|
&& rm -rf /root/.cache/pip \
|
||||||
&& :
|
&& :
|
||||||
|
Loading…
Reference in New Issue
Block a user