Skip to content

Commit 3f45d2f

Browse files
fix(docker)!: move DOCKER_HUB_USERNAME from secrets to input (#612)
1 parent c612115 commit 3f45d2f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/__call-docker.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
pull_request:
2121
workflow_call:
2222
inputs:
23+
docker_hub_username:
24+
description: 'Docker Hub username to use for the workflow.'
25+
required: false
26+
type: string
2327
gh_bot_name:
2428
description: 'GitHub bot name to use for the workflow.'
2529
required: false
@@ -42,9 +46,6 @@ on:
4246
required: true
4347
type: string
4448
secrets:
45-
DOCKER_HUB_USERNAME:
46-
description: 'Docker Hub username to use for the workflow.'
47-
required: false
4849
DOCKER_HUB_PASSWORD:
4950
description: 'Docker Hub password to use for the workflow.'
5051
required: false
@@ -257,7 +258,7 @@ jobs:
257258
if: inputs.publish_release == 'true' # PRs do not have access to secrets
258259
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
259260
with:
260-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
261+
username: ${{ inputs.docker_hub_username }}
261262
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
262263

263264
- name: Log in to the Container registry
@@ -350,7 +351,7 @@ jobs:
350351
- name: Update Docker Hub Description
351352
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
352353
with:
353-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
354+
username: ${{ inputs.docker_hub_username }}
354355
password: ${{ secrets.DOCKER_HUB_PASSWORD }} # token is not currently supported
355356
repository: ${{ needs.check_dockerfiles.outputs.base_tag }}
356357
short-description: ${{ github.event.repository.description }}

0 commit comments

Comments
 (0)