-
Notifications
You must be signed in to change notification settings - Fork 65
48 lines (42 loc) · 1.37 KB
/
ephemeral.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
name: Ephemeral
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
inputs:
action:
description: "Action"
required: true
default: "spawn"
type: choice
options:
- spawn
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
timeout-minutes: 5
runs-on: ubuntu-latest
env:
DATA: ${{ github.event.inputs.action || 'maintenance' }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::490752553772:role/bandada-ephemeral-deploy-slc
role-duration-seconds: 900
aws-region: eu-central-1
- name: Launch instance
run: |
.github/scripts/run.sh ${{ env.DATA }} $GITHUB_REF_NAME $GITHUB_TRIGGERING_ACTOR $GITHUB_SHA
- name: Instance IP
run: |
.github/scripts/get_ip.sh ${{ env.DATA }} $GITHUB_TRIGGERING_ACTOR