Skip to content

Commit b3a34aa

Browse files
committed
feat: remove dev-tag requirement
1 parent e691386 commit b3a34aa

File tree

7 files changed

+150
-264
lines changed

7 files changed

+150
-264
lines changed

.github/workflows/auth-react-test-1.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
- opened
77
- reopened
88
- synchronize
9+
- labeled
10+
- unlabeled
911
push:
10-
tags:
11-
- dev-v[0-9]+.[0-9]+.[0-9]+
12+
branches:
13+
- "[0-9]+.[0-9]+"
1214

1315
# Only one instance of this workflow will run on the same ref (PR/Branch/Tag)
1416
# Previous runs will be cancelled.
@@ -18,6 +20,7 @@ concurrency:
1820

1921
jobs:
2022
define-versions:
23+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
2124
runs-on: ubuntu-latest
2225
outputs:
2326
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
@@ -38,6 +41,7 @@ jobs:
3841
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
3942

4043
setup-auth-react:
44+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
4145
runs-on: ubuntu-latest
4246
needs: define-versions
4347
strategy:
@@ -82,6 +86,7 @@ jobs:
8286
use-common-app-and-test-server: "true"
8387

8488
launch-test-workflow:
89+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
8590
uses: ./.github/workflows/auth-react-test-2.yml
8691
needs: setup-auth-react
8792
name: FDI ${{ matrix.fdi-version }}

.github/workflows/auth-react-test-2.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ on:
4444

4545
jobs:
4646
test:
47+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
4748
runs-on: ubuntu-latest
4849

4950
strategy:

.github/workflows/check-docs.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: "Check if docs need an update"
2+
3+
on:
4+
push:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
8+
permissions:
9+
contents: write
10+
11+
# Only one instance of this workflow will run on the same ref (PR/Branch/Tag)
12+
# Previous runs will be cancelled.
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check-docs:
19+
name: Check if docs need an update
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.ref }}
26+
# Need a complete fetch to make the master merge check work
27+
fetch-depth: 0
28+
fetch-tags: true
29+
token: ${{ secrets.ALL_REPO_PAT }}
30+
31+
- name: Setup git
32+
run: |
33+
# NOTE: The user email is {user.id}+{user.login}@users.noreply.github.com.
34+
# See users API: https://api.github.com/users/github-actions%5Bbot%5D
35+
git config user.name "github-actions[bot]"
36+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
37+
git fetch origin master
38+
39+
- uses: actions/setup-node@v5
40+
with:
41+
node-version: 20
42+
43+
- name: Populate variables
44+
id: versions
45+
run: |
46+
. ./hooks/populate-hook-constants.sh
47+
48+
echo "packageVersion=$packageVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
49+
echo "packageVersionXy=$packageVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
50+
echo "packageLockVersion=$packageLockVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
51+
echo "packageLockVersionXy=$packageLockVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
52+
echo "newestVersion=$newestVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
53+
echo "targetBranch=$targetBranch" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
54+
55+
- name: Check tag and branch correctness
56+
run: |
57+
if [[ "${{ steps.versions.outputs.packageVersion }}" != "${{ steps.versions.outputs.packageLockVersion }}" ]]
58+
then
59+
echo "The package version and package lock version do not match."
60+
exit 1
61+
fi
62+
63+
if [[ "refs/heads/${{ steps.versions.outputs.packageVersion }}" != ${{ github.ref }}* ]]
64+
then
65+
echo "Branch name and package version mismatch"
66+
exit 1
67+
fi
68+
69+
- name: Install dependencies
70+
run: npm install
71+
72+
- name: Build docs
73+
run: |
74+
npm run build-pretty
75+
npm run build-docs
76+
77+
- name: Check for changes in docs and create a commit if necessary
78+
run: |
79+
git update-index --really-refresh
80+
81+
if git diff-index --quiet HEAD; then
82+
# No-op, docs are updated
83+
else
84+
# Update docs and create a commit on the branch
85+
git add --all
86+
git commit -nm "doc: update docs for v${{ steps.versions.outputs.packageVersion }} tag"
87+
git push
88+
fi

.github/workflows/pipeline-dev-tag.yml

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)