'Generic Commit'
This commit is contained in:
parent
b1e90eff90
commit
9de5a0592d
24
.gitea/workflows/BuildTestPublish.yaml
Normal file
24
.gitea/workflows/BuildTestPublish.yaml
Normal file
@ -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
|
@ -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() {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user