Automated Latest Dependency Updates #528
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Notes Updated | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
release_notes_updated: | |
name: release notes updated | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for development branch | |
id: branch | |
shell: python | |
env: | |
REF: ${{ github.event.pull_request.head.ref }} | |
run: | | |
from re import compile | |
import os | |
main = '^main$' | |
release = '^release_v\d+\.\d+\.\d+$' | |
dep_update = '^latest-dep-update-[a-f0-9]{7}$' | |
min_dep_update = '^min-dep-update-[a-f0-9]{7}$' | |
regex = main, release, dep_update, min_dep_update | |
patterns = list(map(compile, regex)) | |
ref = os.environ["REF"] | |
is_dev = not any(pattern.match(ref) for pattern in patterns) | |
print('::set-output name=is_dev::' + str(is_dev)) | |
- if: ${{ steps.branch.outputs.is_dev == 'True' }} | |
name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- if: ${{ steps.branch.outputs.is_dev == 'True' }} | |
name: Check if release notes were updated | |
run: cat release_notes.rst | grep ":pr:\`${{ github.event.number }}\`" |