Skip to content

Commit

Permalink
Dedupe GitHub Actions workflows (#321)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
john-kurkowski committed Mar 6, 2024
1 parent 1f77877 commit 6632577
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: build
on: [push, pull_request]
on:
pull_request: {}
push:
branches:
- "master"
tags-ignore:
- "**"
jobs:
test:
strategy:
Expand Down

0 comments on commit 6632577

Please sign in to comment.