From 7e12f74033d502448aef9d580789b713981cd829 Mon Sep 17 00:00:00 2001 From: Dan Grebb Date: Tue, 16 Jan 2024 00:00:49 -0500 Subject: [PATCH] wip: pass in ghcr credentials --- .github/actions/prepare-docker/action.yml | 10 ++++++++-- .github/workflows/docker-sanity-test.yml | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/actions/prepare-docker/action.yml b/.github/actions/prepare-docker/action.yml index 551493fa7..5dad1048d 100644 --- a/.github/actions/prepare-docker/action.yml +++ b/.github/actions/prepare-docker/action.yml @@ -2,6 +2,12 @@ name: "Pull & Prepare Docker Workflow" description: "Sets name and tag, logs in to GHCR, and pulls Docker image." inputs: + REGISTRY: + description: "GitHub Registry" + required: true + ACTOR: + description: "GitHub Username" + required: true GITHUB_TOKEN: description: "GitHub Token" required: true @@ -23,8 +29,8 @@ runs: - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} + registry: ${{ inputs.REGISTRY }} + username: ${{ inputs.ACTOR }} password: ${{ inputs.GITHUB_TOKEN }} - name: Pull Image diff --git a/.github/workflows/docker-sanity-test.yml b/.github/workflows/docker-sanity-test.yml index 74edea563..55e8c5e52 100644 --- a/.github/workflows/docker-sanity-test.yml +++ b/.github/workflows/docker-sanity-test.yml @@ -40,6 +40,8 @@ jobs: - uses: ./actions/.github/actions/prepare-docker with: + REGISTRY: ${{ env.REGISTRY }} + ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "𓋏 Run `backstop test` in Docker" @@ -78,6 +80,10 @@ jobs: id: base - uses: ./actions/.github/actions/prepare-docker + with: + REGISTRY: ${{ env.REGISTRY }} + ACTOR: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "🎭 Run `backstop test --confg=playwright` in Docker" continue-on-error: true