mirror of
https://github.com/eza-community/eza
synced 2024-10-01 13:43:56 +00:00
ci: make various improvements
- Use the action Swatinem/rust-cache@v2 as it caches previously used dependencies, which helps save a lot of time. - remove secrets.GITHUB_TOKEN as it's available by default. - Use Github Actions concurrency feature, which will cancel previous jobs from a PR if it's been updated.
This commit is contained in:
parent
302ceea81d
commit
0dcfda7333
5
.github/workflows/apt.yml
vendored
5
.github/workflows/apt.yml
vendored
|
@ -12,6 +12,11 @@ on:
|
|||
paths:
|
||||
- 'deb.asc'
|
||||
- '.github/workflows/apt.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
apt_installation:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
7
.github/workflows/conventional-commits.yml
vendored
7
.github/workflows/conventional-commits.yml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Conventional Commits
|
||||
|
@ -14,6 +18,3 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: webiny/action-conventional-commits@v1.1.0
|
||||
# optional, required for private repos
|
||||
# with:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
4
.github/workflows/flake.yml
vendored
4
.github/workflows/flake.yml
vendored
|
@ -3,6 +3,10 @@ on:
|
|||
push:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Nix targets
|
||||
|
|
2
.github/workflows/label.yml
vendored
2
.github/workflows/label.yml
vendored
|
@ -20,5 +20,3 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
|
@ -20,8 +20,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
days-before-pr-stale: 30
|
||||
days-before-pr-close: 14
|
||||
stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity.'
|
||||
|
|
10
.github/workflows/unit-tests.yml
vendored
10
.github/workflows/unit-tests.yml
vendored
|
@ -16,6 +16,10 @@ on:
|
|||
- 'Cargo.*'
|
||||
- build.rs
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
|
@ -34,10 +38,8 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
- run: rustup toolchain install ${{ matrix.rust }} --profile minimal
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: nick-fields/retry@v2
|
||||
|
|
Loading…
Reference in a new issue