Skip to content

Commit cf7621c

Browse files
authored
Testing another way to deploy docker
1 parent 8c91f9f commit cf7621c

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/github-docker-publish.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish Docker image
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version tag for the Docker image'
10+
required: true
11+
default: 'latest'
612

713
jobs:
814
push_to_registries:
@@ -14,14 +20,19 @@ jobs:
1420
attestations: write
1521
id-token: write
1622
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+
1728
- name: Check out the repo
1829
uses: actions/checkout@v4
1930

2031
- name: Log in to Docker Hub
2132
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
2233
with:
23-
username: ${{ secrets.DOCKER_USERNAME }}
24-
password: ${{ secrets.DOCKER_PASSWORD }}
34+
username: ${{ secrets.DOCKERHUB_USER }}
35+
password: ${{ secrets.DOCKERHUB_AT }}
2536

2637
- name: Log in to the Container registry
2738
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@@ -35,8 +46,8 @@ jobs:
3546
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3647
with:
3748
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 }}
4051
4152
- name: Build and push Docker images
4253
id: push

0 commit comments

Comments
 (0)