Skip to content

Commit

Permalink
Run test when "ok to test" is added
Browse files Browse the repository at this point in the history
  • Loading branch information
vbkaisetsu committed Nov 8, 2023
1 parent bbdc558 commit e242798
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
types: [ labeled ]

name: deploy

jobs:
publish:
name: Publish to Cloudflare Pages
runs-on: ubuntu-latest
if: |
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ok to test')) ||
(github.event_name != 'pull_request_target')
permissions:
contents: read
deployments: write
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
- cron: '0 0 * * *'
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
types: [ labeled ]

name: build

Expand All @@ -15,6 +15,9 @@ jobs:
build:
name: Check on ${{ matrix.rust }}
runs-on: ubuntu-latest
if: |
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ok to test')) ||
(github.event_name != 'pull_request_target')
strategy:
matrix:
rust:
Expand Down

0 comments on commit e242798

Please sign in to comment.