Skip to content

Update Validator Versions #15

Update Validator Versions

Update Validator Versions #15

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