forked from microsoft/AL-Go-Actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
58 lines (58 loc) · 1.98 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Check For Updates
author: Microsoft Corporation
permissions:
contents: write
pull-requests: write
workflows: write
inputs:
shell:
description: Shell in which you want to run the action (powershell or pwsh)
required: false
default: powershell
actor:
description: The GitHub actor running the action
required: false
default: ${{ github.actor }}
token:
description: The GitHub token running the action
required: false
default: ${{ github.token }}
templateUrl:
description: URL of the template repository (default is the template repository used to create the repository)
required: false
default: ''
downloadLatest:
description: Set this input to true in order to download latest version of the template repository (else it will reuse the SHA from last update)
required: true
update:
description: Set this input to Y in order to update AL-Go System Files if needed
required: false
default: 'N'
updateBranch:
description: Set the branch to update
required: false
default: ${{ github.ref_name }}
directCommit:
description: Direct Commit?
required: false
default: 'false'
runs:
using: composite
steps:
- name: run
shell: ${{ inputs.shell }}
env:
_actor: ${{ inputs.actor }}
_token: ${{ inputs.token }}
_templateUrl: ${{ inputs.templateUrl }}
_downloadLatest: ${{ inputs.downloadLatest }}
_update: ${{ inputs.update }}
_updateBranch: ${{ inputs.updateBranch }}
_directCommit: ${{ inputs.directCommit }}
run: |
${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "CheckForUpdates" -Action {
${{ github.action_path }}/CheckForUpdates.ps1 -actor $ENV:_actor -token $ENV:_token -templateUrl $ENV:_templateUrl -downloadLatest ($ENV:_downloadLatest -eq 'true') -update $ENV:_update -updateBranch $ENV:_updateBranch -directCommit ($ENV:_directCommit -eq 'true')
}
branding:
icon: terminal
color: blue