@@ -449,8 +449,14 @@ jobs:
449449 name : ubuntu-latest-11
450450 - name : Get latest release version
451451 shell : bash
452+ env :
453+ # An anonymous call shares the 60-an-hour budget of the runner's address with every
454+ # other job there; once it is spent the API answers with no release, the version comes
455+ # out empty and buildx refuses the untagged push (run 34854564649).
456+ GH_TOKEN : ${{ github.token }}
452457 run : |
453- export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
458+ export git_version_last="$(curl -i -o - --silent -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
459+ [ -n "$git_version_last" ] || { echo "::error::The latest release of OpenIdentityPlatform/OpenDJ could not be read, so there is no version to tag the image with"; exit 1; }
454460 echo "release_version=$git_version_last" >> $GITHUB_ENV
455461 echo "image_repository=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
456462 - name : Docker meta
@@ -594,8 +600,14 @@ jobs:
594600 name : ubuntu-latest-11
595601 - name : Get latest release version
596602 shell : bash
603+ env :
604+ # An anonymous call shares the 60-an-hour budget of the runner's address with every
605+ # other job there; once it is spent the API answers with no release, the version comes
606+ # out empty and buildx refuses the untagged push (run 34854564649).
607+ GH_TOKEN : ${{ github.token }}
597608 run : |
598- export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
609+ export git_version_last="$(curl -i -o - --silent -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
610+ [ -n "$git_version_last" ] || { echo "::error::The latest release of OpenIdentityPlatform/OpenDJ could not be read, so there is no version to tag the image with"; exit 1; }
599611 echo "release_version=$git_version_last" >> $GITHUB_ENV
600612 echo "image_repository=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
601613 - name : Docker meta
0 commit comments