test: Add 1, update 1 and remove 2 files
This commit is contained in:
35
.gitea/workflows/BuildTestPublish.yaml
Normal file
35
.gitea/workflows/BuildTestPublish.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Build-Test-Publish
|
||||
run-name: Build test and publish all tools
|
||||
|
||||
on: [push]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
runs-on: ${{ matrix.platform }}
|
||||
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: Test
|
||||
run: |
|
||||
./test.sh
|
||||
- name: Publish
|
||||
run: |
|
||||
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} \
|
||||
RELEASE_WRITE_TOKEN=${{ secrets.RELEASE_WRITE_TOKEN }} \
|
||||
GITEA_CONTAINER_NAME=${{ env.JOB_CONTAINER_NAME }} \
|
||||
./publish.sh
|
10
build.sh
10
build.sh
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
if [ ! -f "${SCRIPT_DIR}/sos" ]; then
|
||||
echo "Error: sos not found in ${SCRIPT_DIR}"
|
||||
exit 1
|
||||
fi
|
20
clean.sh
20
clean.sh
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
PROJECT="sos"
|
||||
|
||||
echo "Cleaning ${PROJECT}..."
|
||||
|
||||
# Remove output directory (if it exists)
|
||||
if [ -d "${SCRIPT_DIR}/output" ]; then
|
||||
echo "Removing output directory..."
|
||||
rm -rf "${SCRIPT_DIR}/output"
|
||||
fi
|
||||
|
||||
# Remove any temporary files
|
||||
echo "Removing temporary files..."
|
||||
find "${SCRIPT_DIR}" -name "*.tmp" -o -name "*.temp" -o -name "*~" | xargs -r rm -f
|
||||
|
||||
echo "✓ ${PROJECT} cleaned successfully"
|
12
test.sh
12
test.sh
@@ -4,5 +4,17 @@ set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
|
||||
# spin up a local simple object server to try
|
||||
|
||||
# docker run -d \
|
||||
# -p 8909:8080 \
|
||||
# -v /path/to/storage:/data/storage \
|
||||
# -v /path/to/sos_config.json:/data/sos_config.json:ro \
|
||||
# --name object-server \
|
||||
# gitea.jde.nz/public/simple-object-server
|
||||
|
||||
|
||||
|
||||
"${SCRIPT_DIR}/sos" upload "getbin.xyz" "${SCRIPT_DIR}/sos" "sos:test" "sos:dodgy"
|
||||
|
||||
|
Reference in New Issue
Block a user