From aabc440f6ba3fdb7d79b3876f438c16c65586f7d Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 11 Feb 2024 09:50:50 +0100 Subject: [PATCH] Pass in auth secrets to workflow_call --- .github/workflows/alpine.yml | 3 +++ .github/workflows/ci.yml | 18 +++++++++++++++--- .github/workflows/debian.yml | 3 +++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index db19df8..5a5c806 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -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 }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95c0da4..7f76a93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index fa388e1..f33ef22 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -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 }}