Skip to content

Commit

Permalink
chore(CI): limit actions not to run on forks, cron rewrite (mdn#14954)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmth authored Aug 14, 2023
1 parent 89010fb commit abe275d
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:

jobs:
docs:
# do not run on forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-check-lint_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:

jobs:
lint-and-review-docs:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-check_duplicates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

jobs:
check_duplicates:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-check_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

jobs:
docs:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-check_redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

jobs:
check_redirects:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-check_yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

jobs:
docs:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:

jobs:
triage:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-rebase-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
label-rebase-needed:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
uses: mdn/workflows/.github/workflows/pr-rebase-needed.yml@main
with:
target-repo: "mdn/translated-content"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:

jobs:
tests:
# do not run on PRs in forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-translated-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
default: ""
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 */24 * * *"
- cron: "0 1 * * *"

jobs:
build:
Expand Down

0 comments on commit abe275d

Please sign in to comment.