-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (62 loc) · 2.77 KB
/
post-release-update_bpmn_visualization_version_in_Examples_repo.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 the version of the bpmn-visualization TypeScript library in Examples repo
on:
repository_dispatch:
types: [ update_bpmn_visualization_version ]
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
build_demo_repo:
description: 'The repository where the demo artifact is stored'
default: "process-analytics/github-actions-playground"
required: true
build_demo_workflow_id:
description: 'The workflow identifier or file name where the demo artifact is stored'
default: "post-release-upload-demo-archive-and-trigger-companion-repositories-update.yml"
required: true
artifact_name:
description: 'The demo artifact name'
default: "demo_"
required: true
jobs:
updateVersion:
runs-on: ${{ vars.RUNNER_UBUNTU }}
env:
VERSION: ${{ github.event.client_payload.version || inputs.version }}
ARTIFACT_NAME: ${{ github.event.client_payload.artifact_name || inputs.artifact_name }}
BUILD_DEMO_WORKFLOW_ID: ${{ github.event.client_payload.build_demo_workflow_id || inputs.build_demo_workflow_id }}
BUILD_DEMO_REPO: ${{ github.event.client_payload.build_demo_repo || inputs.build_demo_repo }}
steps:
- uses: actions/checkout@v4
- name: Update examples
run: echo "Examples updated with version ${{ env.VERSION }}"
- name: Delete old Demo
run: rm -rf README.md
- name: Download Demo ${{ env.VERSION }}
uses: dawidd6/action-download-artifact@v8
with:
github_token: ${{ secrets.GH_RELEASE_TOKEN }}
repo: ${{ env.BUILD_DEMO_REPO }}
workflow: ${{ env.BUILD_DEMO_WORKFLOW_ID }}
workflow_conclusion: success
name: ${{ env.ARTIFACT_NAME }}
path: path/to/artifact
- name: Display structure of downloaded files
run: ls -R
working-directory: path/to/artifact
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_RELEASE_TOKEN }}
commit-message: "chore(deps): update bpmn-visualization version to ${{ env.VERSION }}"
committer: "${{ vars.PA_BOT_NAME }} <${{ vars.PA_BOT_EMAIL }}>"
author: "${{ vars.PA_BOT_NAME }} <${{ vars.PA_BOT_EMAIL }}>"
branch: "chore/update_bpmn_visualization_to_${{ env.VERSION }}"
delete-branch: true
base: "master"
title: "chore(deps): update bpmn-visualization version to ${{ env.VERSION }}"
body: "https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/chore/update_bpmn_visualization_to_${{ env.VERSION }}/examples/index.html"
labels: "enhancement"
team-reviewers: pa-collaborators
draft: true