Skip to content

Mainnet (Manual)

Mainnet (Manual) #265

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: powerfulubuntu
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 }}