Compare commits
15 Commits
36ac0c7db9
...
v051120251
| Author | SHA1 | Date | |
|---|---|---|---|
| 65896be3ef | |||
| 8d143c281a | |||
| 0e74631891 | |||
| d87b43c377 | |||
| 36dfd89908 | |||
| 855cb45fa3 | |||
| 28be30812b | |||
| 862bec0dfd | |||
| fc253de73b | |||
| e7f02ae36e | |||
| c3ba17074e | |||
| b2ceef9201 | |||
| 7779a7e423 | |||
| b5d32ce9b4 | |||
| 6f95d00faf |
@@ -23,11 +23,11 @@ jobs:
|
||||
with:
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Install QEMU (arm)
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: arm64
|
||||
# - name: Install QEMU (arm)
|
||||
# if: matrix.arch == 'arm64'
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
# with:
|
||||
# platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx (arm)
|
||||
if: matrix.arch == 'arm64'
|
||||
@@ -40,16 +40,16 @@ jobs:
|
||||
if [ "${{ matrix.arch }}" = "x86_64" ]; then
|
||||
pip install -r requirements.txt
|
||||
cd app
|
||||
pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||
pyinstaller --onefile --add-data "ui:ui" --name wolServer-${{ matrix.arch }} wolServer.py
|
||||
else
|
||||
echo 'FROM arm64v8/python:3.13-slim-bullseye AS builder
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
COPY app ./app
|
||||
COPY app .
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends binutils \
|
||||
&& pip install -r /app/requirements.txt \
|
||||
&& cd /app/app && pyinstaller --onefile --add-data "ui:ui" wolServer.py \
|
||||
&& mkdir -p /output && cp /app/app/dist/wolServer /output/
|
||||
&& pip install -r requirements.txt \
|
||||
&& pyinstaller --onefile --add-data "ui:ui" --name wolServer-${{ matrix.arch }} wolServer.py \
|
||||
&& mkdir -p /output && cp dist/wolServer-${{ matrix.arch }} /output/
|
||||
FROM scratch
|
||||
COPY --from=builder /output /output' > Dockerfile
|
||||
docker buildx build --platform linux/arm64/v8 --output type=local,dest=app/dist .
|
||||
@@ -58,30 +58,19 @@ jobs:
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: executable-${{ matrix.arch }}
|
||||
path: app/dist
|
||||
name: wolServer-${{ matrix.arch }}
|
||||
path: app/dist/**
|
||||
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Create Dist Directory
|
||||
run: mkdir -p app/dist
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: app/dist
|
||||
|
||||
- name: Rename Artifacts
|
||||
run: |
|
||||
mv app/dist/executable-x86_64/wolServer app/dist/wolServer-x86_64
|
||||
mv app/dist/executable-arm64/wolServer app/dist/wolServer-arm
|
||||
|
||||
- name: Generate Tag
|
||||
id: tag
|
||||
run: echo "TAG=v$(TZ='Europe/Athens' date +'%d%m%Y%H%M%S')" >> $GITEA_ENV
|
||||
@@ -95,7 +84,7 @@ jobs:
|
||||
body: "Automated push release"
|
||||
token: ${{ secrets.mytoken }}
|
||||
files: |-
|
||||
app/dist/wolServer-*
|
||||
app/dist/**
|
||||
|
||||
cleanup:
|
||||
needs: release
|
||||
@@ -104,12 +93,8 @@ jobs:
|
||||
steps:
|
||||
- name: Cleanup Buildx Containers
|
||||
run: |
|
||||
docker ps -q --filter "name=buildx" | xargs -r docker stop
|
||||
docker ps -aq --filter "name=buildx" | xargs -r docker rm
|
||||
docker images --filter "reference=moby/buildkit" -q | xargs -r docker rmi
|
||||
docker images --filter "reference=arm-builder" -q | xargs -r docker rmi
|
||||
docker images --filter "reference=multiarch/qemu-user-static" -q | xargs -r docker rmi
|
||||
docker images --filter "reference=tonistiigi/binfmt" -q | xargs -r docker rmi
|
||||
docker volume ls --filter "name=buildx" -q | xargs -r docker volume rm
|
||||
#docker images --filter "reference=moby/buildkit" -q | xargs -r docker rmi
|
||||
#docker images --filter "reference=tonistiigi/binfmt" -q | xargs -r docker rmi
|
||||
|
||||
#docker images --filter "reference=gitea/runner-images" -q | xargs -r docker rmi
|
||||
#docker volume ls --filter "name=act" -q | xargs -r docker volume rm
|
||||
|
||||
@@ -7,7 +7,7 @@ openssl x509 -req -days 365 -in app/certs/cert.csr -signkey app/certs/cert.key -
|
||||
|
||||
LOCATION="$(pwd)"
|
||||
|
||||
cat << EOF > $LOCATION/app/.env
|
||||
cat << EOF > "$LOCATION/app/.env"
|
||||
# Environment variables
|
||||
WOL_SECRET_KEY="changethis"
|
||||
WOL_USER_PASS="changethat"
|
||||
@@ -44,7 +44,7 @@ LATEST_RELEASE="$(curl -s https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/r
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
wget -O app/wolServer https://git.konsthol.eu/konsthol/WOL-Ly/releases/download/"$LATEST_RELEASE"/wolServer-x86_64
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
wget -O app/wolServer https://git.konsthol.eu/konsthol/WOL-Ly/releases/download/"$LATEST_RELEASE"/wolServer-arm
|
||||
wget -O app/wolServer https://git.konsthol.eu/konsthol/WOL-Ly/releases/download/"$LATEST_RELEASE"/wolServer-arm64
|
||||
fi
|
||||
|
||||
chmod +x app/wolServer
|
||||
|
||||
Reference in New Issue
Block a user