Skip to content

Commit

Permalink
Fix: setup-docker-action by adding secrets as inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schardt authored and Robert Schardt committed Sep 20, 2024
1 parent 94b80c5 commit 08eba20
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/actions/setup-docker-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: 'setup-docker-action'
description: 'Setup docker buildx'
description: 'Setup docker and docker buildx'
inputs:
docker-username:
description: "username for docker registry"
required: true
docker-password:
description: "password for docker registry"
required: true
runs:
using: "composite"
steps:
Expand All @@ -11,5 +18,5 @@ runs:
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ inputs.docker-username }}
password: ${{ inputs.docker-password }}
9 changes: 9 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
uses: actions/checkout@v4
- name: setup-docker-action
uses: ./.github/actions/setup-docker-action
with:
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: determine-tags-action
uses: ./.github/actions/determine-tags-action
- name: "Setup meta information debian:stable"
Expand Down Expand Up @@ -60,6 +63,9 @@ jobs:
uses: actions/checkout@v4
- name: setup-docker-action
uses: ./.github/actions/setup-docker-action
with:
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: determine-tags-action
uses: ./.github/actions/determine-tags-action
- name: "Setup meta information debian:oldstable"
Expand Down Expand Up @@ -97,6 +103,9 @@ jobs:
uses: actions/checkout@v4
- name: setup-docker-action
uses: ./.github/actions/setup-docker-action
with:
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: determine-tags-action
uses: ./.github/actions/determine-tags-action
- name: "Setup meta information debian:testing"
Expand Down

0 comments on commit 08eba20

Please sign in to comment.