chore: just use github actions instead of selfhosted ones, I give up :(
Rust CI / cargo CI (push) Waiting to run Details

This commit is contained in:
Christoph J. Scherr 2024-10-16 20:16:25 +02:00
parent 07f23b7e7b
commit e5c5d94c22
4 changed files with 22 additions and 65 deletions

View File

@ -1,46 +0,0 @@
name: cargo devel CI
on:
push:
branches:
- '**'
# - '!master'
jobs:
format:
name: cargo CI
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: get repo
uses: actions/checkout@v4
- name: install rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: install additional rust things
run: |
rustup component add rustfmt
rustup component add clippy
- name: config custom registry
run: |
mkdir -p ~/.cargo/
echo "" > ~/.cargo/config.toml
echo "[registry]" >> ~/.cargo/config.toml
echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml
echo '[registries.cscherr]' >> ~/.cargo/config.toml
echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml
cat ~/.cargo/config.toml
- name: cargo clippy check
run: cargo clippy --all-features --all-targets --workspace
- name: cargo clippy fix
run: cargo clippy --fix --all-features --all-targets --workspace
- name: cargo fmt
run: cargo fmt --all
- name: cargo test
run: cargo test --all-features --all-targets --workspace
- name: commit back to repository
uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
with:
# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: automatic cargo CI changes

7
.github/dependabot.yaml vendored Normal file
View File

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# Check for updates every Monday
schedule:
interval: "weekly"

View File

@ -1,10 +1,16 @@
name: cargo devel CI name: Rust CI
on: on:
pull_request:
branches:
- '**'
push: push:
branches: branches:
- '**' - '**'
# - '!master' # - '!master'
env:
CARGO_TERM_COLOR: always
jobs: jobs:
CI: CI:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -44,4 +50,4 @@ jobs:
with: with:
# Optional. Commit message for the created commit. # Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes" # Defaults to "Apply automatic changes"
commit_message: automatic cargo CI changes commit_message: "ci: automatic Rust CI changes"

View File

@ -7,30 +7,25 @@ permissions:
on: on:
push: push:
branches: branches:
- master - main
jobs: jobs:
# Release unpublished packages. # Release unpublished packages.
release-plz-release: release-plz-release:
name: Release-plz release name: Release-plz release
# runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Rust toolchain - name: Install Rust toolchain
uses: https://github.com/dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
# - name: Manually Install binaries
# uses: https://github.com/taiki-e/install-action@v2
# with:
# tool: cargo-semver-checks@0.35, release-plz # hack
- name: Run release-plz - name: Run release-plz
uses: https://github.com/MarcoIeni/release-plz-action@v0.5.79 uses: MarcoIeni/release-plz-action@v0.5
with: with:
command: release command: release
backend: gitea
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
@ -38,7 +33,7 @@ jobs:
# Create a PR with the new versions and changelog, preparing the next release. # Create a PR with the new versions and changelog, preparing the next release.
release-plz-pr: release-plz-pr:
name: Release-plz PR name: Release-plz PR
# runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: concurrency:
group: release-plz-${{ github.ref }} group: release-plz-${{ github.ref }}
cancel-in-progress: false cancel-in-progress: false
@ -48,16 +43,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Rust toolchain - name: Install Rust toolchain
uses: https://github.com/dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
# - name: Manually Install binaries
# uses: https://github.com/taiki-e/install-action@v2
# with:
# tool: cargo-semver-checks@0.35, release-plz@0.3.102 # hack
- name: Run release-plz - name: Run release-plz
uses: https://github.com/MarcoIeni/release-plz-action@v0.5.79 uses: MarcoIeni/release-plz-action@v0.5
with: with:
command: release-pr command: release-pr
backend: gitea
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}