Skip to content

Commit bb015ae

Browse files
authored
Merge pull request #2 from ServerlessOpsIO/feature/gha-refactor
fix workspace setup in deploy jobs
2 parents 30e9cba + 14fab7a commit bb015ae

File tree

2 files changed

+117
-1
lines changed

2 files changed

+117
-1
lines changed

.github/workflows/branch.yaml

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,114 @@ jobs:
8787
!node_modules
8888
!.git
8989
if-no-files-found: error
90-
retention-days: 30
90+
retention-days: 30
91+
92+
deploy_shipper_stackset:
93+
needs:
94+
- build
95+
runs-on: ubuntu-latest
96+
permissions:
97+
id-token: write
98+
contents: read
99+
100+
steps:
101+
- name: Setup job workspace
102+
uses: ServerlessOpsIO/gha-setup-workspace@v1
103+
with:
104+
checkout_artifact: true
105+
106+
- name: Setup Python
107+
uses: ServerlessOpsIO/gha-setup-python@v1
108+
109+
# - name: Assume AWS Credentials
110+
# uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
111+
# with:
112+
# build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
113+
# deploy_aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
114+
#
115+
# - name: Install AWS SAM
116+
# uses: aws-actions/setup-sam@v2
117+
#
118+
# - name: Deploy via AWS SAM
119+
# uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
120+
# with:
121+
# aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
122+
# template_file: packaged-stacksets-shipper-template.yaml
123+
# stack_name: "${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_URL }}-${{ env.GITHUB_EVENT_REF_SLUG_URL }}-shipper"
124+
# cfn_capabilities: CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
125+
# env_json: ${{ toJson(vars) }}
126+
# secrets_json: ${{ toJson(secrets) }}
127+
128+
deploy_shipping_stackset:
129+
needs:
130+
- build
131+
- deploy_shipper_stackset
132+
runs-on: ubuntu-latest
133+
permissions:
134+
id-token: write
135+
contents: read
136+
137+
steps:
138+
- name: Setup job workspace
139+
uses: ServerlessOpsIO/gha-setup-workspace@v1
140+
with:
141+
checkout_artifact: true
142+
143+
- name: Setup Python
144+
uses: ServerlessOpsIO/gha-setup-python@v1
145+
146+
# - name: Assume AWS Credentials
147+
# uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
148+
# with:
149+
# build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
150+
# deploy_aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
151+
#
152+
# - name: Install AWS SAM
153+
# uses: aws-actions/setup-sam@v2
154+
#
155+
# - name: Deploy via AWS SAM
156+
# uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
157+
# with:
158+
# aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
159+
# template_file: packaged-stacksets-shipping-template.yaml
160+
# stack_name: "${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_URL }}-${{ env.GITHUB_EVENT_REF_SLUG_URL }}-shipping"
161+
# cfn_capabilities: CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
162+
# env_json: ${{ toJson(vars) }}
163+
# secrets_json: ${{ toJson(secrets) }}
164+
165+
deploy_management:
166+
needs:
167+
- build
168+
- deploy_shipper_stackset
169+
runs-on: ubuntu-latest
170+
permissions:
171+
id-token: write
172+
contents: read
173+
174+
steps:
175+
- name: Setup job workspace
176+
uses: ServerlessOpsIO/gha-setup-workspace@v1
177+
with:
178+
checkout_artifact: true
179+
180+
- name: Setup Python
181+
uses: ServerlessOpsIO/gha-setup-python@v1
182+
183+
# - name: Assume AWS Credentials
184+
# uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
185+
# with:
186+
# build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
187+
# deploy_aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
188+
#
189+
# - name: Install AWS SAM
190+
# uses: aws-actions/setup-sam@v2
191+
#
192+
# - name: Deploy via AWS SAM
193+
# uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
194+
# with:
195+
# aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
196+
# template_file: packaged-template.yaml
197+
# stack_name: "${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_URL }}-${{ env.GITHUB_EVENT_REF_SLUG_URL }}-management"
198+
# cfn_capabilities: CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
199+
# env_json: ${{ toJson(vars) }}
200+
# secrets_json: ${{ toJson(secrets) }}

.github/workflows/main.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101
steps:
102102
- name: Setup job workspace
103103
uses: ServerlessOpsIO/gha-setup-workspace@v1
104+
with:
105+
checkout_artifact: true
104106

105107
- name: Setup Python
106108
uses: ServerlessOpsIO/gha-setup-python@v1
@@ -136,6 +138,8 @@ jobs:
136138
steps:
137139
- name: Setup job workspace
138140
uses: ServerlessOpsIO/gha-setup-workspace@v1
141+
with:
142+
checkout_artifact: true
139143

140144
- name: Setup Python
141145
uses: ServerlessOpsIO/gha-setup-python@v1
@@ -171,6 +175,8 @@ jobs:
171175
steps:
172176
- name: Setup job workspace
173177
uses: ServerlessOpsIO/gha-setup-workspace@v1
178+
with:
179+
checkout_artifact: true
174180

175181
- name: Setup Python
176182
uses: ServerlessOpsIO/gha-setup-python@v1

0 commit comments

Comments
 (0)