generated from NHSDigital/api-management-service-template
-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (36 loc) · 1.33 KB
/
update_validator_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
name: Update Validator Versions
on:
workflow_dispatch:
# runs daily at 08:00
schedule:
- cron: "0 8 * * 3"
jobs:
update-validator:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
- name: Set up date-time branch name
id: datetime
run: |
# shellcheck disable=SC2086
echo "NEW_BRANCH_NAME=update-validator-$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- name: Run update script
run: ./scripts/update_validator_version.sh
- name: Create pull request
if: env.HAS_VALIDATOR_CHANGED == 'true'
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
base: master
branch: ${{ env.NEW_BRANCH_NAME }}
title: "Upgrade: [dependabot] - bump fhir validator from ${{ env.CURRENT_VALIDATOR_VERSION }} to ${{ env.NEW_VALIDATOR_VERSION }}"
body: "This PR was automatically created by GitHub Actions to update validator versions."
commit-message: "Update validator versions on ${{ env.BRANCH_NAME }}"
sign-commits: true
token: ${{ secrets.VALIDATOR_UPGRADE_PAT }}
labels: dependencies