Skip to content

Commit a8a788f

Browse files
committed
ci: refine workflow triggers and release validation
1 parent 81608c7 commit a8a788f

6 files changed

Lines changed: 48 additions & 10 deletions

File tree

.github/workflows/build_and_test.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ on:
2121
push:
2222
branches:
2323
- '**'
24-
tags:
25-
- '**'
2624
pull_request:
2725

2826
concurrency:
29-
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
27+
group: ${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
3028
cancel-in-progress: true
3129

3230
permissions:

.github/workflows/build_docs.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,27 @@
1818
name: "Publish Docs"
1919

2020
on:
21+
pull_request:
22+
paths:
23+
- 'apidoc/**'
24+
- 'docs/**'
25+
- 'include/**'
26+
- '.github/workflows/build_docs.yaml'
2127
push:
2228
branches:
2329
- main
2430
paths:
2531
- 'apidoc/**'
2632
- 'docs/**'
2733
- 'include/**'
34+
- '.github/workflows/build_docs.yaml'
2835

2936
concurrency:
3037
group: ${{ github.workflow }}-${{ github.ref }}
3138
cancel-in-progress: false
3239

3340
permissions:
34-
contents: write
41+
contents: read
3542

3643
jobs:
3744
docs:
@@ -67,8 +74,33 @@ jobs:
6774
touch /tmp/site/.nojekyll
6875
cd -
6976
77+
- name: Upload docs site
78+
if: github.event_name == 'push'
79+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
80+
with:
81+
name: docs-site
82+
path: /tmp/site/
83+
include-hidden-files: true
84+
if-no-files-found: error
85+
86+
deploy:
87+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
88+
needs: docs
89+
runs-on: ubuntu-24.04
90+
permissions:
91+
contents: write
92+
steps:
93+
- uses: actions/checkout@v6.0.1
94+
with:
95+
fetch-depth: 1
96+
97+
- name: Download docs site
98+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
99+
with:
100+
name: docs-site
101+
path: /tmp/site
102+
70103
- name: Deploy to gh-pages
71-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
72104
run: |
73105
git config --global user.name 'GitHub Actions'
74106
git config --global user.email 'actions@github.com'

.github/workflows/gcc8_test.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ on:
2121
push:
2222
branches:
2323
- '**'
24-
tags:
25-
- '**'
2624
pull_request:
2725

2826
concurrency:
29-
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
27+
group: ${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
3028
cancel-in-progress: true
3129

3230
permissions:

.github/workflows/license_check.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
push:
2323
branches:
2424
- main
25+
- 'release-*'
26+
27+
concurrency:
28+
group: ${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
29+
cancel-in-progress: true
2530

2631
jobs:
2732
rat-license-check:

.github/workflows/pre-commit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
branches:
2424
- '**'
2525

26+
concurrency:
27+
group: ${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
28+
cancel-in-progress: true
29+
2630
jobs:
2731
pre-commit:
2832
runs-on: ubuntu-24.04

.github/workflows/release_candidate.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
name: Release Candidate
17+
name: Release Artifact
1818

1919
on:
20+
workflow_dispatch:
2021
pull_request:
2122
paths:
2223
- ".github/workflows/release_candidate.yaml"
@@ -29,7 +30,7 @@ on:
2930
- "scripts/releasing/**"
3031
push:
3132
tags:
32-
- "v*-rc*"
33+
- "v*"
3334

3435
concurrency:
3536
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}

0 commit comments

Comments
 (0)