updated github actions workflow

This commit is contained in:
Vomitblood 2024-08-08 01:06:08 +08:00
parent ebc527a79a
commit 6fa24af2d8
2 changed files with 27 additions and 1 deletions

View file

@ -37,7 +37,7 @@ jobs:
apt update && apt install -y curl apt update && apt install -y curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo $HOME echo $HOME
. "$HOME/.cargo/env" . "/github/home/.cargo/env"
- name: Testing - name: Testing
run: | run: |

26
build2.sh Normal file
View file

@ -0,0 +1,26 @@
#!/bin/bash
IMAGE_NAME="ubuntu:22.04"
HOST_PROJECT_DIR="$PWD"
CONTAINER_PROJECT_DIR="/app"
HOST_OUTPUT_DIR="$PWD/src-tauri/target/release/bundle/appimage"
CONTAINER_OUTPUT_DIR="$CONTAINER_PROJECT_DIR/src-tauri/target/release/bundle/appimage"
USER_ID=$(id -u)
GROUP_ID=$(id -g)
docker pull $IMAGE_NAME
# run the docker image and remove on completion
docker run --rm -it \
-v "$HOST_PROJECT_DIR":$CONTAINER_PROJECT_DIR \
$IMAGE_NAME \
/bin/bash -c "
# update packages
apt update && apt install curl -y && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
echo $HOME && \
source "/root/.cargo/env" && \
cargo --version
"