-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (67 loc) · 2.17 KB
/
pr-validate.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: PR Validate
on:
pull_request:
types: [edited, opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-edit-${{ github.event.number }}
cancel-in-progress: true
jobs:
vars:
name: Variables
runs-on: ubuntu-24.04
outputs:
url: ${{ steps.calculate.outputs.url }}
steps:
- name: Calculate the deployment number
id: calculate
run: echo "url=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT
validate:
name: Validate PR
needs: [vars]
uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.8.2
with:
markdown_links: |
Any successful deployments (not always required) will be available [here](https://${{ github.event.repository.name }}-${{ needs.vars.outputs.url }}-frontend.apps.silver.devops.gov.bc.ca/)
changelog:
name: Pull Request Validation
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: refs/heads/${{ github.head_ref }}
- name: Conventional Changelog Update
id: changelog
continue-on-error: true
uses: TriPSs/conventional-changelog-action@v5
with:
github-token: ${{ github.token }}
output-file: "CHANGELOG.md"
skip-version-file: "true"
skip-commit: "true"
git-push: "false"
git-branch: refs/heads/${{ github.head_ref }}
- name: Checkout pr
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Comment PR
continue-on-error: true
uses: thollander/actions-comment-pull-request@v3
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
message: |
# Current changelog
${{ steps.changelog.outputs.clean_changelog }}
comment_tag: "# Current changelog"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
results:
name: Validate Results
needs: [changelog, validate]
runs-on: ubuntu-24.04
steps:
- run: echo "Workflow completed successfully!"