Skip to content

Commit

Permalink
ci: full-ci triggers all actions on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Nov 12, 2021
1 parent 82105d6 commit 5309e00
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ on:
paths-ignore:
- "**.md"
- "tools/**"
pull_request_target:
paths-ignore:
- "**.md"
- "tools/**"
types:
- labeled
schedule:
- cron: 0 11 * * 1-5

jobs:
unlabel:
if: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'full-ci' }}
runs-on: ubuntu-latest
steps:
- run: gh pr edit $PR --repo $REPO --remove-label "full-ci"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.number }}
REPO: ${{ github.event.repository.full_name }}

build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -129,6 +145,7 @@ jobs:

test-cloudflare:
concurrency: test-cloudflare
if: ${{ !startsWith(github.event_name, 'pull_request') || (github.event_name == 'pull_request_target' && github.event.label.name == 'full-ci') }}
needs:
- build

Expand Down Expand Up @@ -213,7 +230,7 @@ jobs:

test-browsers:
concurrency: test-browsers
if: ${{ github.event_name != 'pull_request' }}
if: ${{ !startsWith(github.event_name, 'pull_request') || (github.event_name == 'pull_request_target' && github.event.label.name == 'full-ci') }}
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
Expand Down

0 comments on commit 5309e00

Please sign in to comment.