Skip to content

Commit 2d3c71b

Browse files
author
Release Manager
committed
Trac #34942: GH Actions: Remove pull_request triggers for portability workflows
The portability tests cannot be run on every PR. Instead we need to run `build`, `doc-build` on every PR (just as we already run `lint`) We also remove the `ticket` workflow; it is not needed. Fixes sagemath/trac-to-github#157 URL: https://trac.sagemath.org/34942 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Tobias Diez
2 parents 1df8f12 + 59033e2 commit 2d3c71b

File tree

9 files changed

+8
-46
lines changed

9 files changed

+8
-46
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build & Test
22

33
on:
4+
pull_request:
45
push:
56
workflow_dispatch:
67
# Allow to run manually

.github/workflows/ci-conda.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Build & Test using Conda
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
64
push:
75
tags:
86
- '*'

.github/workflows/ci-cygwin-minimal.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: CI cygwin-minimal
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
64
push:
75
tags:
86
- '*'

.github/workflows/ci-cygwin-standard.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: CI cygwin-standard
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
64
push:
75
tags:
86
- '*'

.github/workflows/ci-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ name: CI Linux
1818
#on: [push, pull_request]
1919

2020
on:
21-
pull_request:
22-
types: [opened, synchronize]
2321
push:
2422
tags:
2523
- '*'

.github/workflows/ci-macos.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ name: CI macOS
1818
#on: [push, pull_request]
1919

2020
on:
21-
pull_request:
22-
types: [opened, synchronize]
2321
push:
2422
tags:
2523
- '*'

.github/workflows/ci-wsl.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Build & Test WSL
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
64
push:
75
tags:
86
- '*'

.github/workflows/doc-build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build documentation
22

33
on:
4+
pull_request:
45
push:
56
workflow_dispatch:
67
# Allow to run manually
@@ -14,7 +15,8 @@ jobs:
1415
build-docs:
1516
runs-on: ubuntu-latest
1617
container: ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev
17-
if: github.repository == 'sagemath/sagetrac-mirror'
18+
env:
19+
CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' }}
1820
steps:
1921
- name: Checkout
2022
uses: actions/checkout@v3
@@ -32,6 +34,7 @@ jobs:
3234
SAGE_NUM_THREADS: 2
3335

3436
- name: Copy docs
37+
if: env.CAN_DEPLOY == 'true'
3538
run: |
3639
# For some reason the deploy step below cannot find /sage/...
3740
# So copy everything from there to local folder
@@ -41,7 +44,7 @@ jobs:
4144
4245
- name: Deploy to Netlify preview
4346
id: preview-netlify
44-
if: github.ref != 'refs/heads/develop'
47+
if: env.CAN_DEPLOY == 'true' && github.ref != 'refs/heads/develop'
4548
uses: netlify/actions/cli@master
4649
with:
4750
args: deploy --dir=docs --alias="${NETLIFY_ALIAS}"
@@ -59,7 +62,7 @@ jobs:
5962

6063
- name: Deploy to Netlify production
6164
id: deploy-netlify
62-
if: github.ref == 'refs/heads/develop'
65+
if: env.CAN_DEPLOY == 'true' && github.ref == 'refs/heads/develop'
6366
uses: netlify/actions/cli@master
6467
with:
6568
args: deploy --dir=docs --prod
@@ -68,5 +71,6 @@ jobs:
6871
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
6972

7073
- name: Report deployment url
74+
if: env.CAN_DEPLOY == 'true'
7175
run: |
7276
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.preview-netlify.outputs.NETLIFY_URL || steps.deploy-netlify.outputs.NETLIFY_URL }}"

.github/workflows/ticket.yaml

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

0 commit comments

Comments
 (0)