mirror of
https://github.com/ZeroCatDev/ClassworksKV.git
synced 2026-03-05 13:23:09 +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:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
|
DOCKERHUB_USERNAME: zerocatdev
|
||||||
OWNER: zerocatdev
|
OWNER: zerocatdev
|
||||||
PROJECT_NAME: classworks
|
PROJECT_NAME: classworks
|
||||||
concurrency:
|
concurrency:
|
||||||
@ -38,11 +39,20 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
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
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
|
images: |
|
||||||
|
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
|
||||||
|
${{ env.DOCKERHUB_USERNAME }}/${{ env.PROJECT_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user