-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.62 KB
/
deploy-github-oidc.yml
File metadata and controls
53 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Deploy GitHub OIDC Template
on:
push:
branches:
- main
workflow_dispatch:
jobs:
package-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: SAM Build
run: |
sam build \
--template-file github-oidc.yaml \
--base-dir .
- name: SAM Package
run: |
sam package \
--template-file .aws-sam/build/template.yaml \
--s3-bucket razroo-make-bind-public \
--s3-prefix makebind-github-oidc \
--region us-east-1 \
--output-template-file github-oidc-packaged.yaml
- name: Upload packaged template to S3
run: |
aws s3 cp github-oidc-packaged.yaml \
s3://razroo-make-bind-public/github-oidc.yaml \
--region us-east-1
- name: Generate Quick Create URL
run: |
TEMPLATE_URL="https://razroo-make-bind-public.s3.us-east-1.amazonaws.com/github-oidc.yaml"
echo "Quick Create URL:"
echo "https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=${TEMPLATE_URL}&stackName=MakebindGitHubOIDC¶m_GitHubOrg=YOUR_GITHUB_ORG¶m_RepositoryName=*"