Skip to content

Commit

Permalink
Disable Scheduled GitHub Actions on Forks (#150)
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, follow 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 authored Oct 4, 2023
1 parent dbaf260 commit 0eceebc
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/IAMR' || github.event_name != 'schedule' }}
name: CUDA EB 2D
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -61,6 +62,7 @@ jobs:
du -hs ~/.cache/ccache
cuda_no_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/IAMR' || 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/IAMR' || github.event_name != 'schedule' }}
name: GCC EB 3D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:
mpiexec -n 2 ./amr3d.gnu.MPI.ex regtest.3d.flow_past_cylinder-z max_step=3 ns.v=1 mac_proj.verbose=1 nodal_proj.verbose=1
gcc_no_eb_3d:
if: ${{ github.repository == 'AMReX-Codes/IAMR' || github.event_name != 'schedule' }}
name: GCC NO EB 3D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -129,6 +131,7 @@ jobs:
mpiexec -n 2 ./amr3d.gnu.MPI.ex regtest.3d.euler max_step=3 ns.v=1 mac_proj.verbose=1 nodal_proj.verbose=1
gcc_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/IAMR' || github.event_name != 'schedule' }}
name: GCC EB 2D
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -188,6 +191,7 @@ jobs:
./amr2d.gnu.OMP.ex regtest.2d.flow_past_cylinder-x max_step=10 ns.v=1 mac_proj.verbose=1 nodal_proj.verbose=1
gcc_no_eb_2d:
if: ${{ github.repository == 'AMReX-Codes/IAMR' || 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/IAMR' || 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/IAMR' || github.event_name != 'schedule' }}
name: SYCL NO EB 3D
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 0eceebc

Please sign in to comment.