-
Notifications
You must be signed in to change notification settings - Fork 224
43 lines (39 loc) · 1.3 KB
/
pr-closed.yml
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
name: Close PR
on:
pull_request:
types:
- closed
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
do_cleanup:
# Only run this job for events that originate on this repository.
if: github.event.pull_request.head.repo.full_name == github.repository
name: Do cleanup
runs-on: ubuntu-latest
environment: testing
env:
GOPATH: ${{ github.workspace }}/go
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- uses: actions/setup-go@v2
with:
go-version: 1.20.x
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::571684982431:role/ContinuousDelivery
role-session-name: docs-cleanup
role-duration-seconds: 7200
aws-region: us-west-2
- name: Remove unused resources
run: make ci_pull_request_closed
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }}
PULUMI_STACK_NAME: ${{ vars.PULUMI_STACK_NAME }}