mirror of
https://github.com/luxfi/explorer.git
synced 2026-09-24 00:25:12 +00:00
set the docker config in a step, not the job's env
The runner context does not exist at job level, so naming it there is a syntax error and the workflow fails before a step runs. RUNNER_TEMP is the same value and is an ordinary variable once a step is running. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
+18
-10
@@ -31,13 +31,17 @@ jobs:
|
||||
- arch: arm64
|
||||
pool: linux-arm64
|
||||
runs-on: ['${{ matrix.pool }}']
|
||||
env:
|
||||
# Each runner gets its own, because five services share this
|
||||
# machine’s HOME and docker/login-action logs out when a job ends —
|
||||
# taking the credential from whichever job is still pushing.
|
||||
DOCKER_CONFIG: ${{ runner.temp }}/docker
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
# One docker config per RUNNER: several runner services share this
|
||||
# machine’s HOME, and docker/login-action logs out in its post step,
|
||||
# so a job that finishes takes the credential from a job still
|
||||
# pushing. Set here rather than in the job env, where the runner
|
||||
# context does not exist and naming it is a syntax error.
|
||||
- name: One docker config per runner
|
||||
run: |
|
||||
d="$RUNNER_TEMP/docker"; mkdir -p "$d"
|
||||
echo "DOCKER_CONFIG=$d" >> "$GITHUB_ENV"
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -59,14 +63,18 @@ jobs:
|
||||
merge:
|
||||
needs: image
|
||||
runs-on: [linux-amd64]
|
||||
env:
|
||||
# Each runner gets its own, because five services share this
|
||||
# machine’s HOME and docker/login-action logs out when a job ends —
|
||||
# taking the credential from whichever job is still pushing.
|
||||
DOCKER_CONFIG: ${{ runner.temp }}/docker
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
# One docker config per RUNNER: several runner services share this
|
||||
# machine’s HOME, and docker/login-action logs out in its post step,
|
||||
# so a job that finishes takes the credential from a job still
|
||||
# pushing. Set here rather than in the job env, where the runner
|
||||
# context does not exist and naming it is a syntax error.
|
||||
- name: One docker config per runner
|
||||
run: |
|
||||
d="$RUNNER_TEMP/docker"; mkdir -p "$d"
|
||||
echo "DOCKER_CONFIG=$d" >> "$GITHUB_ENV"
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
||||
Reference in New Issue
Block a user