Skip to content

Commit

Permalink
Disable Scheduled GitHub Actions on Forks
Browse files Browse the repository at this point in the history
The default branch on a fork is often out of sync with the main repo,
resulting in failures in scheduled actions. This disables scheduled actions
on forks. Note that `push` and `pull_request` still trigger GitHub actions
on forks. If one wants to disable it entirely in their fork, following the
instruction in the link below.

https://docs.github.com/en/actions/using-workflows/disabling-and-enabling-a-workflow?tool=webui#disabling-a-workflow
  • Loading branch information
WeiqunZhang committed Oct 4, 2023
1 parent 47bad60 commit 54f7938
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
cuda_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: CUDA EB 2D
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
du -hs ~/.cache/ccache
cuda_no_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: CUDA NO EB 2D
runs-on: ubuntu-20.04
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
gcc_eb_3d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: GCC EB 3D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
mpiexec -n 2 ./CAMR3d.gnu.MPI.EB.ex inputs max_step=3
gcc_no_eb_3d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: GCC NO EB 3D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -119,6 +121,7 @@ jobs:
mpiexec -n 2 ./CAMR3d.gnu.MPI.ex inputs-x max_step=3
gcc_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: GCC EB 2D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -173,6 +176,7 @@ jobs:
./CAMR2d.gnu.OMP.EB.ex inputs max_step=10
gcc_no_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: GCC NO EB 2D
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
hip_eb_3d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: HIP EB 3D
runs-on: ubuntu-20.04
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sycl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
sycl_no_eb_3d:
if: ${{ github.repository == 'AMReX-Codes/CAMR' || github.event_name != 'schedule' }}
name: SYCL NO EB 3D
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 54f7938

Please sign in to comment.