Create Fusion App #18
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: Create Fusion App | |
on: | |
workflow_dispatch: | |
inputs: | |
appKey: | |
type: string | |
description: Fusion app key (This cant be changed!) | |
displayName: | |
type: string | |
description: Display name for fusion app | |
category: | |
type: choice | |
description: Fusion app category | |
options: | |
- Construction and Commissioning | |
- Corporate Project Review | |
- Portfolio Management | |
- Project control | |
- Organisation | |
- Project management | |
- Experience | |
- Marketing, Midstream and Processing | |
- Offshore Wind (OW) | |
- Fusion utilities | |
- Fusion administration | |
- Safety, Security and Sustainability | |
- Collaboration | |
- Project Development Centre (PDC) | |
- Quality and risk | |
- Engineering | |
- MMP Liquids | |
permissions: | |
actions: read | |
checks: write | |
contents: read | |
deployments: write | |
id-token: write | |
statuses: write | |
jobs: | |
create-fusion-app-ci: | |
runs-on: ubuntu-latest | |
environment: ci | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required to fetch range | |
- name: Get fusion token | |
id: 'get-fusion-token-ci' | |
uses: ./.github/actions/get-fusion-token | |
with: | |
client-id: ${{secrets.AZURE_CLIENT_ID}} | |
tenant-id: ${{secrets.AZURE_TENANT_ID}} | |
resource-id: ${{secrets.AZURE_RESOURCE_ID}} | |
- name: PNPM setup | |
uses: ./.github/actions/pnpm-setup | |
- name: 'Create application in Fusion CI' | |
shell: bash | |
run: npx tsx ./github-action/src/createFusionApp.ts create -T ${{ steps.get-fusion-token-ci.outputs.token }} -A '${{inputs.appKey}}' -C '${{inputs.category}}' -D '${{inputs.displayName}}' -O '${{vars.FUSION_APP_ADMINS_CI}}' -E 'CI' | |
create-fusion-app-fprd: | |
runs-on: ubuntu-latest | |
environment: fprd | |
steps: | |
- name: Get fusion token | |
id: 'get-fusion-token-fprd' | |
uses: ./.github/actions/get-fusion-token | |
with: | |
client-id: ${{secrets.AZURE_PROD_CLIENT_ID}} | |
tenant-id: ${{secrets.AZURE_TENANT_ID}} | |
resource-id: ${{secrets.AZURE_RESOURCE_PROD_ID}} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required to fetch range | |
- name: PNPM setup | |
uses: ./.github/actions/pnpm-setup | |
- name: 'Create application in Fusion FPRD' | |
shell: bash | |
run: npx tsx ./github-action/src/createFusionApp.ts create -T ${{ steps.get-fusion-token-fprd.outputs.token }} -A '${{inputs.appKey}}' -C '${{inputs.category}}' -D '${{inputs.displayName}}' -O '${{vars.FUSION_APP_ADMINS_FPRD}}' -E 'FPRD' |