Skip to content

Commit

Permalink
Add more push and workflow_dispatch triggers
Browse files Browse the repository at this point in the history
- Trigger `msrv.yml` on the push event, for the same branches
  for which `ci.yml` is triggered on it. That is, make the
  corresponding change to the MSRV workflow that was made to the
  test workflow.

- Remove outdated comments on `msrv.yml`. These comments already
  disagreed with the code, since they named `master` when the
  branch was `main`, and suggested that all pull requests would
  trigger the workflow when really was (and continues to be) also
  limited by branch.

- Add `workflow_dispatch` to the `ci.yml` and `msrv.tml` workflows,
  so they can be manually run even for branches that are not named,
  and in the case of `ci.yml`, so it can be manually run even when
  changes are not made to any of the paths that are also needed
  to trigger it on the push or pull_request events.

- Put `workflow_dispatch` last in the `release.yml` workflow that
  already had it. Currently it is a secondary way to trigger all
  workflows that include it. It was in practice the primary way to
  trigger `release.yml` when the push trigger was broken, but that
  is no longer the case since 286e388 (Byron#1475). Even in testing, it
  is now most often run by pushing a tag. This brings its style in
  line with the style in `cron.yml`, where `workflow_dispatch` was
  already a secondary way to trigger the workflow and listed second.
  • Loading branch information
EliahKagan authored and LuaKT committed Aug 20, 2024
1 parent a2e1878 commit 66de977
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ on:
- 'gix*/**'
- '*.toml'
- Makefile
workflow_dispatch:

jobs:
pure-rust-build:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Minimum Supported Rust Version

on:
# Trigger the workflow on push to master or any pull request
# Ignore all tags
push:
branches: [ main ]
tags-ignore: [ '*' ]
branches:
- main
- 'run-ci/**'
- '**/run-ci/**'
tags-ignore:
- '*'
pull_request:
branches: [ main ]
branches:
- main
workflow_dispatch:

jobs:
rustfmt:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
name: release

on:
workflow_dispatch:
push:
# Enable when testing release infrastructure on a branch.
# branches:
# - fix-releases
tags:
- 'v*'
workflow_dispatch:

defaults:
run:
Expand Down

0 comments on commit 66de977

Please sign in to comment.