From 75d14e73fc6cbff78bcf17f010846e76e56356d2 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 22 Oct 2024 17:22:15 -0600 Subject: [PATCH] github-ci: misc fixes - Fix git permissions after checkout - Don't use terminal in Docker if running in GitHub CI --- .github/workflows/builds.yml | 2 ++ build-dist.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 23502489..8f4e5c00 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -18,6 +18,8 @@ jobs: container: rust:latest steps: - uses: actions/checkout@v4 + # Needed to we can get the build revision, required by build.rs + - run: git config --global --add safe.directory /__w/evebox/evebox - run: cargo test --all build-dist: diff --git a/build-dist.sh b/build-dist.sh index 00dadff6..a86d2b3d 100755 --- a/build-dist.sh +++ b/build-dist.sh @@ -44,7 +44,8 @@ cross_run() { fi dockerfile="./docker/builder/Dockerfile.cross" tag=${BUILDER_TAG:-"evebox/builder:cross"} - if test -t; then + env + if [ -z "${GITHUB_REPOSITORY}" && test -t ]; then it="-it" else it=""