mirror of
https://github.com/social-tw/social-tw-website.git
synced 2026-01-09 15:38:09 -05:00
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: CD-Main
|
|
run-name: ${{ github.actor }} acitvates the actions 🚀
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
branches: ['dev', 'prod']
|
|
inputs:
|
|
build-services:
|
|
description: 'build which services'
|
|
required: true
|
|
default: 'relay-frontend'
|
|
type: choice
|
|
options:
|
|
- relay-frontend
|
|
- contract
|
|
version:
|
|
description: 'current deploy version'
|
|
required: true
|
|
default: '0.0.1'
|
|
env:
|
|
description: 'deployment stage'
|
|
required: true
|
|
default: 'dev'
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
uses: ./.github/workflows/build-all.yml
|
|
with:
|
|
build-services: ${{ inputs.build-services }}
|
|
version: ${{ inputs.version }}
|
|
env: ${{ inputs.env }}
|
|
secrets: inherit
|
|
|
|
frontend:
|
|
needs: build
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
uses: ./.github/workflows/deploy-frontend.yml
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
env: ${{ inputs.env }}
|
|
secrets: inherit
|
|
|
|
relay:
|
|
needs: frontend
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
uses: ./.github/workflows/deploy-relay.yml
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
env: ${{ inputs.env }}
|
|
secrets: inherit
|