-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 2.08 KB
/
stop-aws-services.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: stop-aws-services
on:
workflow_dispatch:
schedule:
- cron: '0 14 * * *' # 毎日PM 11:00に実行(+9:00)
jobs:
#stop-ec2:
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: read
# steps:
# - uses: actions/checkout@v3
# - name: configure aws credentials
# uses: aws-actions/configure-aws-credentials@v1-node16
# with:
# role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/aws-identity-providers-federation-github-actions
# aws-region: ap-northeast-1
# - name: Stop EC2 Instance
# run: sh ./scripts/ec2_stop.sh
stop-ecs-item-service:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/aws-identity-providers-federation-github-actions
aws-region: ap-northeast-1
- name: Stop ECS Service
run: sh ./scripts/ecs_stop.sh item-service
stop-ecs-reservation-service:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/aws-identity-providers-federation-github-actions
aws-region: ap-northeast-1
- name: Stop ECS Service
run: sh ./scripts/ecs_stop.sh reservation-service
stop-ecs-user-service:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/aws-identity-providers-federation-github-actions
aws-region: ap-northeast-1
- name: Stop ECS Service
run: sh ./scripts/ecs_stop.sh user-service