mirror of
https://github.com/ZeroCatDev/ClassworksKV.git
synced 2026-03-05 05:03:10 +00:00
fix: add Docker Hub login step and include Docker Hub image in metadata extraction
This commit is contained in:
parent
dba1ec05e5
commit
2dfe698461
12
.github/workflows/docker-publish.yml
vendored
12
.github/workflows/docker-publish.yml
vendored
@ -10,6 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
DOCKERHUB_USERNAME: zerocatdev
|
||||
OWNER: zerocatdev
|
||||
PROJECT_NAME: classworks
|
||||
concurrency:
|
||||
@ -38,11 +39,20 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ env.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
|
||||
images: |
|
||||
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.PROJECT_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user