feat: add configuration to docker hub
This commit is contained in:
1 parent
c82c7d5418
commit
e69e301ea9
1 file changed
+9
-1
@@ -51,6 +51,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
DOCKERHUB_IMAGE: doktainer/doktainer
|
||||||
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/doktainer
|
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/doktainer
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -75,11 +76,18 @@ 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: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract image metadata
|
- name: Extract image metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.IMAGE_NAME }}
|
images: ${{ env.IMAGE_NAME }},${{ env.DOCKERHUB_IMAGE }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
|
|||||||
Reference in new issue
Block a user