Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GitHub Actions CI config #13317

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: CI
on:
push:
branches-ignore: [master]
branches:
- auto-cargo
- try
- automation/bors/try
pull_request:
branches: ['*']
branches:
- "**"
Urgau marked this conversation as resolved.
Show resolved Hide resolved

defaults:
run:
Expand All @@ -12,6 +16,10 @@ defaults:
permissions:
contents: read

concurrency:
group: "${{ github.workflow }}-${{ (github.ref == 'refs/heads/try' && github.sha) || github.ref }}"
cancel-in-progress: true

jobs:
success:
permissions:
Expand All @@ -28,7 +36,7 @@ jobs:
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/auto-cargo' || github.ref == 'refs/heads/try') && github.repository == 'rust-lang/cargo'"
steps:
- run: echo ok
failure:
Expand All @@ -46,7 +54,7 @@ jobs:
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/auto-cargo' || github.ref == 'refs/heads/try') && github.repository == 'rust-lang/cargo'"
steps:
- run: exit 1

Expand Down