From 04b2b21e584e8b8e26da16047ab1b2d347b86865 Mon Sep 17 00:00:00 2001 From: Moss Cantwell Date: Wed, 11 Sep 2024 13:46:50 +1200 Subject: [PATCH] fix: add change for token 403 failure sync script not working --- .github/workflows/sync.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 64dac0a..3374e30 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -38,15 +38,14 @@ jobs: if: github.ref_name == 'main' - name: prepare auth podman env: - GHCR_USER: geonetci - GHCR_TOKEN: ${{ secrets.GH_CI_USER_TOKEN }} DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} DOCKER_USER: geonetci RUN_ECR: ${{ github.ref_name == 'main' || 'FALSE' }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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 + podman login --authfile=$auth_tmp -u ${{ github.actor }} --password $GH_TOKEN ghcr.io echo -n $DOCKER_TOKEN | podman login --authfile=$auth_tmp -u $DOCKER_USER --password-stdin docker.io if [ "$RUN_ECR" != "FALSE" ]; then aws ecr get-login-password --region ap-southeast-2 | podman login "$ECR" -u AWS --password-stdin