From 36cc72c36a8e86ce309bbebead68263bc0a219b7 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 22 Jan 2024 15:39:33 -0800 Subject: [PATCH] add sudo to actions --- .github/workflows/build.yaml | 8 ++------ .github/workflows/zig-mach.yaml | 4 ++-- .github/workflows/zig-nightly.yaml | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 952c3a2..a689df4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,10 +8,6 @@ on: jobs: build-zig-0.11.0-amd64-host: runs-on: ubuntu-latest - # Need to use the default container with node and all that, so we can - # use JS-based actions like actions/checkout@v3... - # container: - # image: alpine:3.15.0 env: ZIG_VERSION: 0.11.0 ARCH: x86_64 @@ -27,8 +23,8 @@ jobs: - name: Install zig run: | wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig + sudo tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz + sudo ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig - name: Run tests run: zig build test --verbose - name: Build example diff --git a/.github/workflows/zig-mach.yaml b/.github/workflows/zig-mach.yaml index 9729102..bacb8e6 100644 --- a/.github/workflows/zig-mach.yaml +++ b/.github/workflows/zig-mach.yaml @@ -29,8 +29,8 @@ jobs: run: | apt-get update && apt-get install -y jq file="$(curl -Osw '%{filename_effective}' "$(curl -s https://machengine.org/zig/index.json |jq -r '."'${ZIG_VERSION}'"."x86_64-linux".tarball')")" - tar x -C /usr/local -f "${file}" - ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig + sudo tar x -C /usr/local -f "${file}" + sudo ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig zig version - name: Run tests run: zig build test --verbose diff --git a/.github/workflows/zig-nightly.yaml b/.github/workflows/zig-nightly.yaml index a5e6e49..3e6d83d 100644 --- a/.github/workflows/zig-nightly.yaml +++ b/.github/workflows/zig-nightly.yaml @@ -27,8 +27,8 @@ jobs: run: | apt-get update && apt-get install -y jq file="$(curl -Osw '%{filename_effective}' "$(curl -s https://ziglang.org/download/index.json |jq -r '."'${ZIG_VERSION}'"."x86_64-linux".tarball')")" - tar x -C /usr/local -f "${file}" - ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig + sudo tar x -C /usr/local -f "${file}" + sudo ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig zig version - name: Run tests run: zig build test --verbose