Skip to content

Commit

Permalink
Merge pull request #242 from WyriHaximusNet/pass-in-auth-secrets-to-w…
Browse files Browse the repository at this point in the history
…orkflow_call

Pass in auth secrets to workflow_call
  • Loading branch information
WyriHaximus authored Feb 11, 2024
2 parents 8d7b013 + 9cfb987 commit 6695618
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ jobs:
with:
alpine: ${{ needs.supported-alpine-versions.outputs.alpine }}
debian: "[]"
docker_user: secrets.HUB_USERNAME
ghcr_token: secrets.GHCR_TOKEN
hub_passcode: secrets.HUB_PASSCODE
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ on:
description: JSON string with Debian versions to build
required: true
type: string
docker_user:
description: Auth
required: true
type: string
ghcr_token:
description: Auth
required: true
type: string
hub_passcode:
description: Auth
required: true
type: string

jobs:
supported-php-versions:
Expand Down Expand Up @@ -279,9 +291,9 @@ jobs:
command: |
(jq -r 'to_entries | map("echo \"$" + .value + "\" | docker login " + .key + " --username \"${{ env.DOCKER_USER }}\" --password-stdin") | .[]' <<<"$DOCKER_IMAGE_REGISTRIES_SECRET_MAPPING") | sh
env:
DOCKER_USER: ${{ secrets.HUB_USERNAME }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
HUB_PASSCODE: ${{ secrets.HUB_PASSCODE }}
DOCKER_USER: ${{ inputs.docker_user }}
GHCR_TOKEN: ${{ inputs.ghcr_token }}
HUB_PASSCODE: ${{ inputs.hub_passcode }}
- name: Docker info
run: docker info
- name: Retag
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ jobs:
with:
alpine: "[]"
debian: ${{ needs.supported-debian-versions.outputs.debian }}
docker_user: secrets.HUB_USERNAME
ghcr_token: secrets.GHCR_TOKEN
hub_passcode: secrets.HUB_PASSCODE

0 comments on commit 6695618

Please sign in to comment.