-
Notifications
You must be signed in to change notification settings - Fork 18
87 lines (84 loc) · 2.6 KB
/
mainnet-manual.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Mainnet (Manual)
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Environment'
options:
- 'mainnet'
network:
type: choice
description: 'Network'
options:
- 'arbitrum'
- 'fluidity'
group:
description: 'Group'
required: true
service:
description: 'Service'
required: true
build_root_container:
type: boolean
description: 'Build root-container'
default: false
build_build_container:
type: boolean
description: 'Build build-container'
default: false
skip_build:
type: boolean
description: 'Skip docker build'
default: false
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ap-southeast-2
role-to-assume: ${{ secrets.FLU_AWS_GITHUB_OIDC_ROLE }}
role-duration-seconds: 7200 #seconds
- name: Build
if: ${{ github.event.inputs.skip_build == 'false' }}
id: build
uses: ./scripts/actions
with:
command: |
flu build-docker \
--network ${{ github.event.inputs.network }} \
--group ${{ github.event.inputs.group }} \
--service ${{ github.event.inputs.service }} \
--environment ${{ github.event.inputs.environment }} \
--build-root-container ${{ github.event.inputs.build_root_container }} \
--build-build-container ${{ github.event.inputs.build_build_container }} \
--tag $GITHUB_SHA
- name: Deploy
id: deploy
uses: ./scripts/actions
with:
command: |
flu deploy-service \
--network ${{ github.event.inputs.network }} \
--group ${{ github.event.inputs.group }} \
--service ${{ github.event.inputs.service }} \
--environment ${{ github.event.inputs.environment }} \
--debug false \
--tag $GITHUB_SHA
- name: Discord
uses: ./scripts/actions
if: always()
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
with:
command: |
flu send-discord --webhook-url ${{ secrets.FLU_CI_DISCORD_WEBHOOK_URL }} --status ${{ job.status }}