ci: add rust specific ci and auto-gen oss standard labels

This commit is contained in:
neon_arch 2023-05-13 19:16:15 +03:00
parent 58a3527a69
commit 3be13d0ab6
7 changed files with 89 additions and 5 deletions

16
.github/workflows/clippy.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Clippy check
on:
push:
branches:
- rolling
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

21
.github/workflows/labels.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: Import open source standard labels
on:
push:
branches: [ main ]
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: EddieHubCommunity/gh-action-open-source-labels@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner-name: ${{ github.repository_owner }}
repository-name: ${{ github.event.repository.name }}
force: true # optional to clear existing labels, default to true

View file

@ -67,7 +67,7 @@ jobs:
uses: actions/create-release@v1
if: steps.changelog.outputs.skipped == 'false'
env:
GITHUB_TOKEN: ${{ secrets.CHANGELOG_RELEASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}

8
.github/workflows/rust_cache.yml vendored Normal file
View file

@ -0,0 +1,8 @@
- name: Cache Rust compilation
uses: metalbear-co/sccache-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Optional, default is `sccache-`
cache-from: sccache-${{ runner.os }}-
# Optional, default is `sccache-latest`
cache-to: sccache-${{ runner.os }}-${{ github.sha }}

15
.github/workflows/rustfmt.yml vendored Normal file
View file

@ -0,0 +1,15 @@
name: Rustfmt
on:
push:
branches:
- rolling
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

27
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'