Skip to content

Commit a1be080

Browse files
author
Ian Lewis
authored
fix: Update references check (#533)
Fix references check Signed-off-by: Ian Lewis <[email protected]>
1 parent 1ed3847 commit a1be080

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

.github/workflows/pre-submit.actions.yml

-21
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,3 @@ jobs:
3939
with:
4040
name: dist
4141
path: dist/
42-
43-
check-docs:
44-
runs-on: ubuntu-latest
45-
if: ${{ contains(github.event.pull_request.body, '#label:release') }}
46-
env:
47-
BODY: ${{ github.event.pull_request.body }}
48-
steps:
49-
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
50-
51-
- name: Check documentation is up-to-date
52-
run: |
53-
RELEASE_TAG=$(
54-
echo "$BODY" | \
55-
grep -oE '^[[:blank:]]*#label:release[[:blank:]]+v?[0-9]+\.[0-9]+\.[0-9]+' | \
56-
sed -E 's/.*([0-9]+\.[0-9]+\.[0-9])/\1/'
57-
)
58-
if [[ -z "$RELEASE_TAG" ]]; then
59-
echo "Invalid release PR body. Must include `#label:release vX.Y.Z"
60-
exit 1
61-
fi
62-
RELEASE_TAG="${RELEASE_TAG}" ./.github/workflows/scripts/pre-release/references.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: References pre submits
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
check-docs:
11+
runs-on: ubuntu-latest
12+
if: ${{ contains(github.event.pull_request.body, '#label:release') }}
13+
env:
14+
BODY: ${{ github.event.pull_request.body }}
15+
steps:
16+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
17+
18+
- name: Check documentation is up-to-date
19+
run: |
20+
RELEASE_TAG=$(:
21+
echo "$BODY" |
22+
grep -oE '^[[:blank:]]*#label:release[[:blank:]]+v?[0-9]+\.[0-9]+\.[0-9]+' |
23+
sed -E 's/.*([0-9]+\.[0-9]+\.[0-9])/\1/'
24+
)
25+
if [[ -z "$RELEASE_TAG" ]]; then
26+
echo 'Invalid release PR body. Must include `#label:release vX.Y.Z`'
27+
exit 1
28+
fi
29+
RELEASE_TAG="${RELEASE_TAG}" ./.github/workflows/scripts/pre-release/references.sh

0 commit comments

Comments
 (0)