Change Actions files Linting
All checks were successful
Run Tests on Code / run-tests (push) Successful in 4s

This commit is contained in:
Neshura 2024-01-13 16:24:48 +01:00
parent 169bbea6ae
commit 5dd63ab68c
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
3 changed files with 41 additions and 44 deletions

View file

@ -11,14 +11,13 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Add Clippy
name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
-
name: Checking Out Repository Code - name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache - name: Set Up Cargo Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
@ -28,11 +27,11 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy - name: Run Clippy
run: cargo clippy run: cargo clippy
-
name: Check if Version in Cargo.toml matches Tag - name: Check if Version in Cargo.toml matches Tag
run: | run: |
VERSION=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " ") VERSION=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " ")
if test $VERSION != "${{ github.ref_name }}"; then if test $VERSION != "${{ github.ref_name }}"; then
@ -48,19 +47,18 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Checking Out Repository Code
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Prepare build environment - name: Prepare build environment
run: mkdir dist run: mkdir dist
-
name: Compiling To Linux Target - name: Compiling To Linux Target
run: | run: |
cargo build -r cargo build -r
mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64 mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64
-
name: Uploading Build Artifact - name: Uploading Build Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: release_blobs name: release_blobs
@ -72,11 +70,10 @@ jobs:
if: success() if: success()
runs-on: docker runs-on: docker
steps: steps:
- - name: Downloading All Build Artifacts
name: Downloading All Build Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
-
name: Upload Binary - name: Upload Binary
run: | run: |
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
--upload-file release_blobs/${{ github.event.repository.name }}-linux-amd64 \ --upload-file release_blobs/${{ github.event.repository.name }}-linux-amd64 \
@ -90,14 +87,13 @@ jobs:
if: success() if: success()
runs-on: docker runs-on: docker
steps: steps:
- - name: Downloading All Build Artifacts
name: Downloading All Build Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
-
name: Filter out env files - name: Filter out env files
run: rm release_blobs/build.env run: rm release_blobs/build.env
-
name: Release New Version - name: Release New Version
uses: actions/forgejo-release@v1 uses: actions/forgejo-release@v1
with: with:
direction: upload direction: upload

View file

@ -11,14 +11,13 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Add Clippy
name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
-
name: Checking Out Repository Code - name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache - name: Set Up Cargo Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
@ -28,8 +27,8 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy - name: Run Clippy
run: cargo clippy run: cargo clippy
build: build:
@ -38,19 +37,18 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Checking Out Repository Code
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Prepare build environment - name: Prepare build environment
run: mkdir dist run: mkdir dist
-
name: Compiling To Linux Target - name: Compiling To Linux Target
run: | run: |
cargo build -r cargo build -r
mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64 mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64
-
name: Uploading Build Artifact - name: Uploading Build Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: release_blobs name: release_blobs

View file

@ -15,8 +15,10 @@ jobs:
steps: steps:
- name: Add Clippy - name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
- name: Checking Out Repository Code - name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
- name: Set Up Cargo Cache - name: Set Up Cargo Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -27,5 +29,6 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Clippy - name: Run Clippy
run: cargo clippy run: cargo clippy