ci: Publish docker image to Docker Hub

https://hub.docker.com/r/recyclarr/recyclarr
pull/137/head
Robert Dailey 2 years ago
parent 5f418a9d90
commit bff81639ce

@ -185,6 +185,7 @@ jobs:
name: Docker name: Docker
needs: musl needs: musl
uses: ./.github/workflows/docker.yml uses: ./.github/workflows/docker.yml
secrets: inherit
# The main purpose of this job is to group all the other jobs together into one single job status # The main purpose of this job is to group all the other jobs together into one single job status
# that can be set as a requirement to merge pull requests. This is easier than enumerating all # that can be set as a requirement to merge pull requests. This is easier than enumerating all

@ -35,7 +35,9 @@ jobs:
env: env:
SEMVER: type=semver,enable=${{ steps.check_version.outputs.match }},value=${{ github.ref_name }} SEMVER: type=semver,enable=${{ steps.check_version.outputs.match }},value=${{ github.ref_name }}
with: with:
images: ghcr.io/${{ github.repository }} images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: | tags: |
type=edge,branch=master type=edge,branch=master
${{ env.SEMVER }},pattern={{major}}.{{minor}}.{{patch}} ${{ env.SEMVER }},pattern={{major}}.{{minor}}.{{patch}}
@ -47,6 +49,13 @@ jobs:
with: with:
path: docker/artifacts path: docker/artifacts
- name: Login to Docker Hub
if: env.SHOULD_PUBLISH
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR - name: Login to GHCR
if: env.SHOULD_PUBLISH if: env.SHOULD_PUBLISH
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -64,3 +73,11 @@ jobs:
platforms: linux/arm/v7,linux/arm64,linux/amd64 platforms: linux/arm/v7,linux/arm64,linux/amd64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
if: github.ref == 'refs/heads/master'
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_REPOSITORY: ${{ github.repository }}

Loading…
Cancel
Save