fix: replace actions/checkout with manual git commands
Some checks failed
CI/CD Pipeline / Code Format (push) Failing after 8s
CI/CD Pipeline / Clippy Lints (push) Failing after 6s
CI/CD Pipeline / Unit Tests (push) Failing after 3s
CI/CD Pipeline / Build Debian Package (push) Has been skipped
CI/CD Pipeline / Build RPM Package (push) Has been skipped
CI/CD Pipeline / Build Alpine Package (push) Has been skipped
CI/CD Pipeline / Build Arch Package (push) Has been skipped
CI/CD Pipeline / Security Audit (push) Failing after 6s
Some checks failed
CI/CD Pipeline / Code Format (push) Failing after 8s
CI/CD Pipeline / Clippy Lints (push) Failing after 6s
CI/CD Pipeline / Unit Tests (push) Failing after 3s
CI/CD Pipeline / Build Debian Package (push) Has been skipped
CI/CD Pipeline / Build RPM Package (push) Has been skipped
CI/CD Pipeline / Build Alpine Package (push) Has been skipped
CI/CD Pipeline / Build Arch Package (push) Has been skipped
CI/CD Pipeline / Security Audit (push) Failing after 6s
Gitea runners do not have Node.js installed, which is required for all JavaScript-based GitHub Actions including actions/checkout. - Replace all actions/checkout@v4 with manual git fetch/checkout - All checkout logic now uses shell commands only - No JavaScript-based actions remain in the workflow
This commit is contained in:
@ -16,14 +16,16 @@ jobs:
|
|||||||
name: Code Format
|
name: Code Format
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
rustup component add rustfmt
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
@ -31,15 +33,16 @@ jobs:
|
|||||||
name: Clippy Lints
|
name: Clippy Lints
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -51,14 +54,15 @@ jobs:
|
|||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -70,14 +74,15 @@ jobs:
|
|||||||
name: Security Audit
|
name: Security Audit
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -92,14 +97,15 @@ jobs:
|
|||||||
needs: [fmt, clippy, test]
|
needs: [fmt, clippy, test]
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -121,14 +127,15 @@ jobs:
|
|||||||
needs: [fmt, clippy, test]
|
needs: [fmt, clippy, test]
|
||||||
runs-on: fedora
|
runs-on: fedora
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo dnf install -y rpm-build gcc systemd-devel pkg-config
|
run: sudo dnf install -y rpm-build gcc systemd-devel pkg-config
|
||||||
- name: Build release binary
|
- name: Build release binary
|
||||||
@ -152,20 +159,20 @@ jobs:
|
|||||||
needs: [fmt, clippy, test]
|
needs: [fmt, clippy, test]
|
||||||
runs-on: alpine
|
runs-on: alpine
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache curl bash
|
apk add --no-cache curl bash
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
|
||||||
source "$HOME/.cargo/env"
|
|
||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache alpine-sdk rust cargo openssl-dev elogind-dev musl-dev git abuild gcc nodejs
|
apk add --no-cache alpine-sdk rust cargo openssl-dev elogind-dev musl-dev git abuild gcc
|
||||||
- name: Build release binary
|
- name: Build release binary
|
||||||
run: cargo build --release --target x86_64-unknown-linux-musl
|
run: cargo build --release --target x86_64-unknown-linux-musl
|
||||||
- name: Build Alpine package
|
- name: Build Alpine package
|
||||||
@ -187,14 +194,15 @@ jobs:
|
|||||||
needs: [fmt, clippy, test]
|
needs: [fmt, clippy, test]
|
||||||
runs-on: arch
|
runs-on: arch
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
run: |
|
||||||
fetch-depth: 0
|
git fetch --unshallow 2>/dev/null || true
|
||||||
|
git checkout "$GITHUB_SHA" || true
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
. "$HOME/.cargo/env"
|
||||||
echo "CARGO_HOME=$HOME/.cargo" >> $GITHUB_ENV
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo pacman -Syu --noconfirm rust cargo systemd git base-devel
|
run: sudo pacman -Syu --noconfirm rust cargo systemd git base-devel
|
||||||
- name: Build release binary
|
- name: Build release binary
|
||||||
|
|||||||
Reference in New Issue
Block a user