Skip to content

Commit 1bf6d27

Browse files
committed
Run "Check Certificates" workflow on modification
This will facilitate testing and review of modifications to the workflow. Because the workflow requires access to repository secrets, and so will fail whenever triggered by an event from a fork, a conditional is added to make it only run when the modifications are made within the `arduino/arduino-create-agent` repository.
1 parent 8d3193b commit 1bf6d27

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/check-certificates.yml

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Check Certificates
22

33
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
44
on:
5+
push:
6+
paths:
7+
- ".github/workflows/check-certificates.ya?ml"
8+
pull_request:
9+
paths:
10+
- ".github/workflows/check-certificates.ya?ml"
511
schedule:
612
# run every 10 hours
713
- cron: "0 */10 * * *"
@@ -14,6 +20,10 @@ env:
1420

1521
jobs:
1622
check-certificates:
23+
# Only run when the workflow will have access to the certificate secrets.
24+
if: >
25+
(github.event_name != 'pull_request' && github.repository == 'arduino/arduino-create-agent') ||
26+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'arduino/arduino-create-agent')
1727
runs-on: ubuntu-18.04
1828

1929
strategy:

0 commit comments

Comments
 (0)