Skip to content

Commit 6632577

Browse files
Dedupe GitHub Actions workflows (#321)
This is a minor optimization of the following. 1. Only run the workflow 1x instead of 2x on a PR that's from a branch instead of a fork. * This is done by only triggering on push events when they're to the master branch. If you want to trigger the workflow on other branches, be sure to open a PR. 2. Do not run the workflow on tags. * Tags are made on existing commits on the master branch, which already has workflow coverage, per the previous point. Optimizing this isn't a big deal for an open source project on GitHub, where GitHub Actions usage is free. However, it is a big deal for private repository development, where usage is limited (where I've been doing some testing).
1 parent 1f77877 commit 6632577

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: build
2-
on: [push, pull_request]
2+
on:
3+
pull_request: {}
4+
push:
5+
branches:
6+
- "master"
7+
tags-ignore:
8+
- "**"
39
jobs:
410
test:
511
strategy:

0 commit comments

Comments
 (0)