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:
|
||||
|
||||
env:
|
||||
DOCKERHUB_IMAGE: doktainer/doktainer
|
||||
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/doktainer
|
||||
|
||||
jobs:
|
||||
@@ -75,11 +76,18 @@ 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: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract image metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.IMAGE_NAME }}
|
||||
images: ${{ env.IMAGE_NAME }},${{ env.DOCKERHUB_IMAGE }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=ref,event=branch
|
||||
|
||||
Reference in new issue
Block a user