build(ci): publish to dockerhub

This commit is contained in:
Mogeko 2021-11-17 20:23:06 +00:00
parent 5f8bb5c1e7
commit 032219bee2
No known key found for this signature in database
GPG key ID: B35485A88F40AD2C
2 changed files with 12 additions and 8 deletions

View file

@ -4,10 +4,6 @@ on:
schedule: schedule:
- cron: '30 23 * * *' - cron: '30 23 * * *'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/qbittorrent
jobs: jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -40,10 +36,16 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with: with:
registry: ${{ env.REGISTRY }} registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
@ -51,7 +53,9 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@548e2346a9987b56d8a4104fe776321ff8e23440 uses: docker/metadata-action@548e2346a9987b56d8a4104fe776321ff8e23440
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: |
${{ github.repository_owner }}/qbittorrent
ghcr.io/${{ github.repository_owner }}/qbittorrent
tags: | tags: |
type=edge type=edge
type=schedule,pattern={{date 'YYYYMMDD'}} type=schedule,pattern={{date 'YYYYMMDD'}}

View file

@ -39,8 +39,8 @@ jobs:
uses: docker/metadata-action@548e2346a9987b56d8a4104fe776321ff8e23440 uses: docker/metadata-action@548e2346a9987b56d8a4104fe776321ff8e23440
with: with:
images: | images: |
{{ github.repository_owner }}/qbittorrent ${{ github.repository_owner }}/qbittorrent
ghcr.io/{{ github.repository_owner }}/qbittorrent ghcr.io/${{ github.repository_owner }}/qbittorrent
tags: | tags: |
type=edge type=edge
type=schedule,pattern={{date 'YYYYMMDD'}} type=schedule,pattern={{date 'YYYYMMDD'}}