Repository navigation
70 lines (67 loc) · 2.55 KB
/
Copy pathupdate_release_workflows.yml
File metadata and controls
70 lines (67 loc) · 2.55 KB
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
64
65
66
67
68
69
70
name: Update Release workflows
on:
workflow_call:
jobs:
generate_release_workflows:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- id: generate_token
name: Generate token
uses: tibdex/github-app-token@v2.1.0
with:
app_id: ${{ secrets.FMSC_BOT_GITHUB_APP_ID }}
private_key: ${{ secrets.FMSC_BOT_GITHUB_APP_PRIVATE_KEY }}
- name: Install FSLABScli
uses: ForesightMiningSoftwareCorporation/fslabscli-action@v1
with:
token: ${{ steps.generate_token.outputs.token }}
version: ${{ vars.FSLABSCLI_VERSION }}
- id: generate_workflow
name: Generate updated workflows
shell: bash
working-directory: .
run: |-
template_path=".github/workflows/release.template"
if [ -e "$template_path" ]; then
template_option="--template $template_path"
else
template_option=""
fi
fslabscli generate-release-workflow --test-publish-required-disabled --fslabscli-version ${{ vars.FSLABSCLI_VERSION }} --build-workflow-version ${{ vars.BUILD_WORKFLOW_VERSION }} ${template_option}
- id: generate_wix_files
name: Generate release wix files
shell: bash
working-directory: .
run: |-
fslabscli generate-wix
- id: derive_branch_name
name: Derive branch name
shell: bash
working-directory: .
run: |
branch_name="${{ github.base_ref || github.ref }}"
echo "branch_name=ci/update-ci-workflows-${branch_name##*/}" >> "$GITHUB_OUTPUT"
- name: Create Pull request with new ci
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate_token.outputs.token }}
commit-message: "chore: update release and test pipelines"
branch: ${{ steps.derive_branch_name.outputs.branch_name }}
delete-branch: true
title: "chore: update release and test pipelines"
labels: ci
body: |
Release workflows needs updating
team-reviewers: Infra
add-paths: |
.github/workflows/release_publish.yml
- name: Mark PR as auto-mergeable
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ steps.generate_token.outputs.token }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash