diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f9294e..c2cef7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: pip install botocore boto3 - name: Update metadata run: | + aws sts get-caller-identity ./scripts/update-release-metadata.py sigsci-module-golang ${{ github.ref }} env: PROD_ID: ${{ secrets.SIGSCI_PROD_CANONICAL_ID }} diff --git a/scripts/update-release-metadata.py b/scripts/update-release-metadata.py index 82e9dc3..284a2d0 100755 --- a/scripts/update-release-metadata.py +++ b/scripts/update-release-metadata.py @@ -35,11 +35,13 @@ def write_metadata(data): resp = client.put_object( Body=data, Bucket='release-metadata', - Key='release-versions', - GrantFullControl=prod_canonical_id + Key='release-versions-rell', + GrantFullControl=f'id={prod_canonical_id}' ) - if resp.ResponseMetadata.HTTPStatusCode != 200: + print(resp) + + if resp["ResponseMetadata"]["HTTPStatusCode"] != 200: sys.stderr.write('Unable to upload file. Dumping response metadata.\n') print(resp, file=sys.stderr) return 1