Create a new app in [main] #2
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 a new app' | |
run-name: "Create a new app in [${{ github.ref_name }}]" | |
on: | |
workflow_dispatch: | |
inputs: | |
project: | |
description: Project name if the repository is setup for multiple projects | |
required: false | |
default: '.' | |
name: | |
description: Name | |
required: true | |
publisher: | |
description: Publisher | |
required: true | |
idrange: | |
description: ID range (from..to) | |
required: true | |
sampleCode: | |
description: Include Sample code? | |
type: boolean | |
default: true | |
directCommit: | |
description: Direct Commit? | |
type: boolean | |
default: false | |
useGhTokenWorkflow: | |
description: Use GhTokenWorkflow for PR/Commit? | |
type: boolean | |
default: false | |
permissions: | |
actions: read | |
contents: write | |
id-token: write | |
pull-requests: write | |
defaults: | |
run: | |
shell: powershell | |
env: | |
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
jobs: | |
CreateApp: | |
needs: [ ] | |
runs-on: [ windows-latest ] | |
steps: | |
- name: Dump Workflow Information | |
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
with: | |
shell: powershell | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Initialize the workflow | |
id: init | |
uses: microsoft/AL-Go/Actions/WorkflowInitialize@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
with: | |
shell: powershell | |
- name: Read settings | |
uses: microsoft/AL-Go/Actions/ReadSettings@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
with: | |
shell: powershell | |
get: type | |
- name: Read secrets | |
id: ReadSecrets | |
uses: microsoft/AL-Go/Actions/ReadSecrets@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
with: | |
shell: powershell | |
gitHubSecrets: ${{ toJson(secrets) }} | |
getSecrets: 'TokenForPush' | |
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' | |
- name: Creating a new app | |
uses: microsoft/AL-Go/Actions/CreateApp@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
with: | |
shell: powershell | |
token: ${{ steps.ReadSecrets.outputs.TokenForPush }} | |
project: ${{ github.event.inputs.project }} | |
type: ${{ env.type }} | |
name: ${{ github.event.inputs.name }} | |
publisher: ${{ github.event.inputs.publisher }} | |
idrange: ${{ github.event.inputs.idrange }} | |
sampleCode: ${{ github.event.inputs.sampleCode }} | |
directCommit: ${{ github.event.inputs.directCommit }} | |
- name: Finalize the workflow | |
if: always() | |
uses: microsoft/AL-Go/Actions/WorkflowPostProcess@a46044fa1ffca4b1ff05d2d1844fd7d5922c6984 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
shell: powershell | |
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
currentJobContext: ${{ toJson(job) }} |