From 9de5a0592d9e34be2935e2ec852b5d1480565461 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 1 Jun 2025 12:02:44 +1200 Subject: [PATCH] 'Generic Commit' --- .gitea/workflows/BuildTestPublish.yaml | 24 ++++++++++++++++++++++++ buildtestpublish_all.sh | 11 +++++++---- dropshell-build/src/dropshell-build | 13 +++++-------- 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 .gitea/workflows/BuildTestPublish.yaml diff --git a/.gitea/workflows/BuildTestPublish.yaml b/.gitea/workflows/BuildTestPublish.yaml new file mode 100644 index 0000000..5b86b34 --- /dev/null +++ b/.gitea/workflows/BuildTestPublish.yaml @@ -0,0 +1,24 @@ +name: Build-Test-Publish +run-name: Build test and publish all tools + +on: [push] + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login to Gitea + uses: docker/login-action@v3 + with: + registry: gitea.jde.nz + username: DoesntMatter + password: ${{ secrets.DOCKER_PUSH_TOKEN }} + - name: Build Test Publish All + run: | + SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ./buildtestpublish_all.sh diff --git a/buildtestpublish_all.sh b/buildtestpublish_all.sh index a522d87..e7f7308 100755 --- a/buildtestpublish_all.sh +++ b/buildtestpublish_all.sh @@ -5,16 +5,19 @@ set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - - - function buildtestpublish() { local dir="$1" cd "$dir" + TOOLNAME=$(basename "$dir") - echo "Building $(basename "$dir")" + echo "Building $TOOLNAME" + echo "Testing $TOOLNAME" + + echo "Publishing $TOOLNAME" + + echo "Done" } function buildtestpublish_all() { diff --git a/dropshell-build/src/dropshell-build b/dropshell-build/src/dropshell-build index 3263257..765e2a4 100755 --- a/dropshell-build/src/dropshell-build +++ b/dropshell-build/src/dropshell-build @@ -233,26 +233,23 @@ function buildspawn() { echo "PWD: ${PWD}" echo "JOB_CONTAINER_NAME: ${JOB_CONTAINER_NAME}" - # shellcheck disable=SC2086 docker run --rm -i --entrypoint /bin/bash \ --volumes-from="${JOB_CONTAINER_NAME}" \ "gitea.jde.nz/public/dropshell-build:${TAG}" \ - rm -rf /app && \ - ln -s "${GITHUB_WORKSPACE}" /app && \ - dropshell-build $FLAGS /app + bash -c "rm -rf /app && \ + ln -s ${GITHUB_WORKSPACE} /app && \ + dropshell-build $FLAGS /app" else echo "Running locally" - # shellcheck disable=SC2086 docker run --rm \ -u "$(id -u)":"$(id -g)" \ -v "$BUILD_DIR":/app \ "gitea.jde.nz/public/dropshell-build:${TAG}" \ - dropshell-build $FLAGS /app + bash -c "dropshell-build $FLAGS /app" fi else echo "Using local native buildchain" - # shellcheck disable=SC2086 - build $FLAGS "$BUILD_DIR" + bash -c "build $FLAGS $BUILD_DIR" fi }