Skip to content

Commit dfd7252

Browse files
authored
Merge pull request #245 from gersonrs/develop
feat: adjust docker build workflow
2 parents d8c7a9f + 06c5b28 commit dfd7252

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/modules-docker-build-push.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ on:
2929
required: false
3030
type: string
3131
default: "linux/amd64"
32+
registry:
33+
description: "Registro Docker (ex: docker.io/quay.io/ghcr.io)"
34+
required: false
35+
type: string
36+
default: "docker.io"
3237
secrets:
33-
DOCKERHUB_USERNAME:
34-
description: "Username do Docker Hub"
38+
USERNAME:
39+
description: "Username do Docker Hub ou outro registro Docker"
3540
required: true
36-
DOCKERHUB_TOKEN:
37-
description: "Token de acesso do Docker Hub"
41+
TOKEN:
42+
description: "Token de acesso do Docker Hub ou outro registro Docker"
3843
required: true
3944

4045
permissions:
@@ -44,7 +49,7 @@ permissions:
4449
attestations: write
4550

4651
env:
47-
REGISTRY: docker.io
52+
REGISTRY: ${{ inputs.registry }}
4853

4954
jobs:
5055
docker:
@@ -77,8 +82,8 @@ jobs:
7782
if: github.event_name != 'pull_request'
7883
uses: docker/login-action@v3
7984
with:
80-
username: ${{ secrets.DOCKERHUB_USERNAME }}
81-
password: ${{ secrets.DOCKERHUB_TOKEN }}
85+
username: ${{ secrets.USERNAME }}
86+
password: ${{ secrets.TOKEN }}
8287

8388
- name: Build and push
8489
id: push

0 commit comments

Comments
 (0)