Skip to content

Commit 356e4e1

Browse files
DO NOT MERGE - [RE-206] - moving hc-releases s3 bucket to a new AWS account (hashicorp#392)
* adding github actions for aws assume role * rearranging so assume role is before hc-releases upload * some updates after testing the aws github action * updating role-duration-seconds to an hour Co-authored-by: claire-labry <[email protected]>
1 parent d3e0c9b commit 356e4e1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/release.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ jobs:
6060
-
6161
name: Import PGP key for archive signing
6262
run: echo -e "${{ secrets.PGP_SIGNING_KEY }}" | gpg --import
63+
-
64+
name: Configure AWS Credentials
65+
uses: aws-actions/configure-aws-credentials@v1
66+
with:
67+
aws-access-key-id: ${{ secrets.TERRAFORM_PROD_AWS_ACCESS_KEY_ID }}
68+
aws-secret-access-key: ${{ secrets.TERRAFORM_PROD_AWS_SECRET_ACCESS_KEY }}
69+
aws-region: us-east-1
70+
role-to-assume: ${{ secrets.TERRAFORM_PROD_AWS_ROLE_TO_ASSUME }}
71+
role-skip-session-tagging: true
72+
role-duration-seconds: 3600
6373
-
6474
name: Release
6575
uses: goreleaser/goreleaser-action@v2
@@ -68,8 +78,6 @@ jobs:
6878
args: release
6979
env:
7080
PGP_USER_ID: ${{ secrets.PGP_USER_ID }}
71-
RELEASE_AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_AWS_ACCESS_KEY_ID }}
72-
RELEASE_AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }}
7381
CODESIGN_IMAGE: ${{ steps.codesign.outputs.image }}
7482
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7583
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
@@ -80,6 +88,4 @@ jobs:
8088
name: Publish released artifacts
8189
run: hc-releases publish -product=terraform-ls
8290
env:
83-
AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_AWS_ACCESS_KEY_ID }}
84-
AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }}
8591
FASTLY_API_TOKEN: ${{ secrets.RELEASE_FASTLY_API_TOKEN }}

.goreleaser.yml

-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ publishers:
103103
checksum: true
104104
signature: true
105105
cmd: hc-releases upload-file {{ abs .ArtifactPath }}
106-
env:
107-
- AWS_ACCESS_KEY_ID={{ .Env.RELEASE_AWS_ACCESS_KEY_ID }}
108-
- AWS_SECRET_ACCESS_KEY={{ .Env.RELEASE_AWS_SECRET_ACCESS_KEY }}
109106

110107
changelog:
111108
skip: true

0 commit comments

Comments
 (0)