Skip to content

Commit 309910c

Browse files
authored
Migrate release wf to oidc (#250)
1 parent 6162391 commit 309910c

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

.github/workflows/release.yaml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write # required for uploading releases
10+
id-token: write
1011

1112
env:
1213
DEFAULT_GO_VERSION: ^1.23
@@ -45,12 +46,15 @@ jobs:
4546
build/k8s-resources/${{ env.RELEASE_VERSION }}/all-resources.yaml
4647
build/k8s-resources/${{ env.RELEASE_VERSION }}/helm-chart-archives/*
4748
49+
- name: Configure AWS credentials
50+
uses: aws-actions/configure-aws-credentials@v4
51+
with:
52+
role-to-assume: ${{ secrets.WF_ROLE_ARN }}
53+
role-session-name: "aemm-release-${{ github.run_id }}"
54+
aws-region: us-east-1
55+
4856
- name: Release Docker Linux
4957
run: make release-docker-linux
50-
env:
51-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
52-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
53-
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
5458

5559
releaseWindows:
5660
name: Release Windows
@@ -64,12 +68,15 @@ jobs:
6468
- name: Check out code into the Go module directory
6569
uses: actions/checkout@v2
6670

71+
- name: Configure AWS credentials
72+
uses: aws-actions/configure-aws-credentials@v4
73+
with:
74+
role-to-assume: ${{ secrets.WF_ROLE_ARN }}
75+
role-session-name: "aemm-release-windows-${{ github.run_id }}"
76+
aws-region: us-east-1
77+
6778
- name: Release Windows Docker Image
6879
run: make release-docker-windows
69-
env:
70-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
71-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
72-
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
7380

7481
postRelease:
7582
name: Post Release
@@ -87,19 +94,18 @@ jobs:
8794
- name: Sync to Homebrew
8895
run: make homebrew-sync
8996

97+
- name: Configure AWS credentials
98+
uses: aws-actions/configure-aws-credentials@v4
99+
with:
100+
role-to-assume: ${{ secrets.WF_ROLE_ARN }}
101+
role-session-name: "aemm-post-release-${{ github.run_id }}"
102+
aws-region: us-east-1
103+
90104
- name: Sync Helm Chart Catalog information
91105
run: make sync-catalog-information-for-helm-chart
92-
env:
93-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
94-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
95-
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
96106

97107
- name: Sync Helm Chart to ECR Public
98108
run: make push-helm-chart
99-
env:
100-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
101-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
102-
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
103109

104110
helmLint:
105111
name: Helm Lint Test

0 commit comments

Comments
 (0)