From 5dd63ab68cce56cecb4115fd5d32d351f26a2e59 Mon Sep 17 00:00:00 2001 From: Neshura Date: Sat, 13 Jan 2024 16:24:48 +0100 Subject: [PATCH] Change Actions files Linting --- .forgejo/workflows/build+release.yml | 52 +++++++++++++--------------- .forgejo/workflows/pull-requests.yml | 30 ++++++++-------- .forgejo/workflows/test.yml | 3 ++ 3 files changed, 41 insertions(+), 44 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 537bef4..abab934 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -11,14 +11,13 @@ jobs: runs-on: docker container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - - - name: Add Clippy + - name: 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 - - - name: Set Up Cargo Cache + + - name: Set Up Cargo Cache uses: actions/cache@v3 with: path: | @@ -28,11 +27,11 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Run Clippy + + - name: Run Clippy run: cargo clippy - - - name: Check if Version in Cargo.toml matches Tag + + - name: Check if Version in Cargo.toml matches Tag run: | VERSION=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " ") if test $VERSION != "${{ github.ref_name }}"; then @@ -48,19 +47,18 @@ jobs: runs-on: docker container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - - - name: Checking Out Repository Code + - name: Checking Out Repository Code uses: https://code.forgejo.org/actions/checkout@v3 - - - name: Prepare build environment + + - name: Prepare build environment run: mkdir dist - - - name: Compiling To Linux Target + + - name: Compiling To Linux Target run: | cargo build -r 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 with: name: release_blobs @@ -72,11 +70,10 @@ jobs: if: success() runs-on: docker steps: - - - name: Downloading All Build Artifacts + - name: Downloading All Build Artifacts uses: actions/download-artifact@v3 - - - name: Upload Binary + + - name: Upload Binary run: | echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ --upload-file release_blobs/${{ github.event.repository.name }}-linux-amd64 \ @@ -90,14 +87,13 @@ jobs: if: success() runs-on: docker steps: - - - name: Downloading All Build Artifacts + - name: Downloading All Build Artifacts uses: actions/download-artifact@v3 - - - name: Filter out env files + + - name: Filter out env files run: rm release_blobs/build.env - - - name: Release New Version + + - name: Release New Version uses: actions/forgejo-release@v1 with: direction: upload diff --git a/.forgejo/workflows/pull-requests.yml b/.forgejo/workflows/pull-requests.yml index 61f6c50..e287ca8 100644 --- a/.forgejo/workflows/pull-requests.yml +++ b/.forgejo/workflows/pull-requests.yml @@ -11,14 +11,13 @@ jobs: runs-on: docker container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - - - name: Add Clippy + - name: 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 - - - name: Set Up Cargo Cache + + - name: Set Up Cargo Cache uses: actions/cache@v3 with: path: | @@ -28,8 +27,8 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Run Clippy + + - name: Run Clippy run: cargo clippy build: @@ -38,19 +37,18 @@ jobs: runs-on: docker container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - - - name: Checking Out Repository Code + - name: Checking Out Repository Code uses: https://code.forgejo.org/actions/checkout@v3 - - - name: Prepare build environment + + - name: Prepare build environment run: mkdir dist - - - name: Compiling To Linux Target + + - name: Compiling To Linux Target run: | cargo build -r 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 with: name: release_blobs diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 49ae841..6f9fea8 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -15,8 +15,10 @@ jobs: steps: - name: Add Clippy run: rustup component add clippy + - name: Checking Out Repository Code uses: https://code.forgejo.org/actions/checkout@v3 + - name: Set Up Cargo Cache uses: actions/cache@v3 with: @@ -27,5 +29,6 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Run Clippy run: cargo clippy \ No newline at end of file