File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ name: Publish Docker image
3
3
on :
4
4
release :
5
5
types : [published]
6
+ workflow_dispatch :
7
+ inputs :
8
+ version :
9
+ description : ' Version tag for the Docker image'
10
+ required : true
11
+ default : ' latest'
6
12
7
13
jobs :
8
14
push_to_registries :
@@ -14,14 +20,19 @@ jobs:
14
20
attestations : write
15
21
id-token : write
16
22
steps :
23
+ - name : Set Vars
24
+ run : |
25
+ REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
26
+ echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
27
+
17
28
- name : Check out the repo
18
29
uses : actions/checkout@v4
19
30
20
31
- name : Log in to Docker Hub
21
32
uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
22
33
with :
23
- username : ${{ secrets.DOCKER_USERNAME }}
24
- password : ${{ secrets.DOCKER_PASSWORD }}
34
+ username : ${{ secrets.DOCKERHUB_USER }}
35
+ password : ${{ secrets.DOCKERHUB_AT }}
25
36
26
37
- name : Log in to the Container registry
27
38
uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
35
46
uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
36
47
with :
37
48
images : |
38
- my-docker-hub-namespace/my-docker-hub-repository
39
- ghcr.io/${{ github.repository }}
49
+ ${{ env.REPO_NAME }}
50
+ ghcr.io/${{ env.REPO_NAME }}
40
51
41
52
- name : Build and push Docker images
42
53
id : push
You can’t perform that action at this time.
0 commit comments