-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (57 loc) · 2.49 KB
/
update-genexus-dep-version.yml
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
59
60
61
62
63
name: Update specified dependency version in GeneXus
on:
workflow_call:
inputs:
VERSION:
#description: 'The version to update to'
type: string
required: true
COMMIT_MESSAGE:
#description: 'The commit message for the update'
type: string
required: false
COMMITTER:
#description: 'The committer name (defaults to the GitHub actor if not provided)'
type: string
required: false
PACKAGE_NAMES:
#description: 'Comma-separated list of package names to update. _Default value_: repository name.'
type: string
required: false
jobs:
dispatch-repository-call:
name: Call workflow
runs-on: ubuntu-latest
env:
ORGANIZATION: ${{ secrets.GENEXUS_DEPENDENCY_SYNC_REPO_OWNER }}
REPOSITORY: ${{ secrets.GENEXUS_DEPENDENCY_SYNC_REPO_NAME }}
REPOSITORY_BRANCH: 'v2'
WORKFLOW: 'commit-to-git-manual.yml'
steps:
- name: Create GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GENEXUS_SUITE_LINK_APP_ID }}
private-key: ${{ secrets.GENEXUS_SUITE_LINK_APP_PRIVATE_KEY }}
owner: ${{ env.ORGANIZATION }}
repositories: ${{ env.REPOSITORY }}
- name: Trigger the workflow_dispatch event
uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: '${{ env.ORGANIZATION }}',
repo: '${{ env.REPOSITORY }}',
workflow_id: '${{ env.WORKFLOW }}',
ref: '${{ env.REPOSITORY_BRANCH }}',
inputs: {
COMPONENT_NAME: '${{ github.repository }}',
BRANCH: '${{ github.ref_name }}',
VERSION: '${{ inputs.VERSION }}',
COMMITTER: '${{ inputs.COMMITTER || github.actor }}',
COMMIT_MESSAGE: '${{ inputs.COMMIT_MESSAGE }}',
PACKAGE_NAMES: '${{ inputs.PACKAGE_NAMES }}',
}
})