mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-08-23 04:15:08 +09:00
fix: attach git credentials before Tag Major Version push
The Tag Major Version step ran 'git push origin' after Checkout Again re-cloned with persist-credentials: false, leaving the remote without credentials. This caused 'fatal: could not read Username' (exit 128) on the first release. Set the authenticated remote URL using OSDS_ACCESS_TOKEN before pushing tags, mirroring the Update README step.
This commit is contained in:
@@ -55,6 +55,8 @@
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "github-aws-sdk-osds-automation@amazon.com"
|
||||
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}"
|
||||
git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
|
||||
if git rev-parse "v${{ steps.release.outputs.major }}" >/dev/null 2>&1; then
|
||||
git tag -d "v${{ steps.release.outputs.major }}"
|
||||
git push origin ":v${{ steps.release.outputs.major }}"
|
||||
|
||||
Reference in New Issue
Block a user