From 35a39511768fe553e0403eec28b01dff16a4262e Mon Sep 17 00:00:00 2001 From: Moss Cantwell Date: Fri, 6 Sep 2024 15:40:02 +1200 Subject: [PATCH] fix: change ecr env var to avoid clash this was supposed to allow dry-run vs run on main but got this error Error: authenticating creds for true: pinging container registry true: Get https://true/v2/: dial tcp: lookup true: Temporary failure in name resolution --- .github/workflows/sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index efecf8c..6cf47c1 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -42,13 +42,13 @@ jobs: GHCR_TOKEN: ${{ secrets.GH_CI_USER_TOKEN }} DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} DOCKER_USER: geonetci - ECR: ${{ github.ref_name == 'main' || 'FALSE' }} + RUN_ECR: ${{ github.ref_name == 'main' || 'FALSE' }} run: | auth_tmp=$(mktemp) echo '{}' > $auth_tmp # JSON formating is required echo -n $GHCR_TOKEN | podman login --authfile=$auth_tmp -u $GHCR_USER --password-stdin ghcr.io echo -n $DOCKER_TOKEN | podman login --authfile=$auth_tmp -u $DOCKER_USER --password-stdin docker.io - if [ "$ECR" != "FALSE" ]; then + if [ "$RUN_ECR" != "FALSE" ]; then aws ecr get-login-password --region ap-southeast-2 | podman login "$ECR" -u AWS --password-stdin fi podman secret create skopeo-auth $auth_tmp