Dcellar-web-ui prod mainnet CICD #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dcellar-web-ui prod mainnet CICD | |
on: | |
# pull_request: | |
# types: | |
# - closed | |
# branches: | |
# - main | |
workflow_dispatch: | |
inputs: | |
project: | |
description: "Release the project manually." | |
required: true | |
default: "dcellar-web-ui" | |
type: string | |
env: | |
description: "Choose the environment for deployment." | |
required: true | |
default: "mainnet" | |
type: string | |
branch: | |
description: "Choose the branch for deployment" | |
required: true | |
default: "mainnet-main" | |
type: string | |
jobs: | |
pre-check: | |
runs-on: ubuntu-latest | |
if: ((github.event.inputs.project == 'dcellar-web-ui') && (github.event.inputs.env == 'mainnet')) | |
outputs: | |
codeowners: ${{ steps.codeowners.outputs.content }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Read codeowners | |
id: codeowners | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: .github/CODEOWNERS | |
check-codeowners: | |
runs-on: ubuntu-latest | |
needs: [pre-check] | |
if: (!contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login)) | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create Version Comment | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
comment-id: ${{ github.event.comment.id }} | |
body: | | |
++++++ | |
Please contact codeowners to deploy! | |
reactions: rocket | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CICD: | |
needs: [pre-check] | |
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login)) | |
uses: node-real/github-workflows/.github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml@feat/opt-fe/devin | |
secrets: inherit | |
with: | |
app_name: dcellar-web-ui | |
env: mainnet | |
branch_name: mainnet-main |