Anpassungen und Release-Optionen
This commit is contained in:
100
.gitea/workflows/release.yml
Normal file
100
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# Git(tea) Actions workflow: Build and publish standalone binaries
|
||||||
|
# ────────────────────────────────────────────────────────────────────
|
||||||
|
# ✧ Builds the Go‑based WoL server for
|
||||||
|
# • linux/amd64 → wol-server-linux-amd64.tar.gz
|
||||||
|
# • windows/amd64 → wol-server-windows-amd64.zip
|
||||||
|
# ✧ Attaches the archives as workflow artifacts **and** to a tag‑based release
|
||||||
|
# (vX.Y.Z). If the push is to main (without tag), the artifacts are still
|
||||||
|
# available in the workflow run.
|
||||||
|
#
|
||||||
|
# Prerequisites (⇔ repository secrets / variables):
|
||||||
|
# • GITEA_TOKEN – API token with repo write permissions (for release upload)
|
||||||
|
# (not needed if your Gitea instance auto‑authenticates Actions)
|
||||||
|
# ────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
name: build‑binaries
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
tags: [ "v*" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-fast
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: linux # ➜ .tar.gz
|
||||||
|
ext: ""
|
||||||
|
- goos: windows # ➜ .zip (adds .exe)
|
||||||
|
ext: ".exe"
|
||||||
|
|
||||||
|
env:
|
||||||
|
GO_VERSION: "1.22"
|
||||||
|
BINARY_NAME: wol-server
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go ${{ env.GO_VERSION }}
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.goos }}/amd64
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
GOOS=${{ matrix.goos }} GOARCH=amd64 go build -trimpath -ldflags "-s -w" \
|
||||||
|
-o "dist/${BINARY_NAME}-${{ matrix.goos }}-amd64${{ matrix.ext }}" .
|
||||||
|
|
||||||
|
- name: Package archive
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd dist
|
||||||
|
if [ "${{ matrix.goos }}" == "windows" ]; then
|
||||||
|
zip "${BINARY_NAME}-windows-amd64.zip" "${BINARY_NAME}-windows-amd64.exe"
|
||||||
|
rm "${BINARY_NAME}-windows-amd64.exe"
|
||||||
|
else
|
||||||
|
tar -czf "${BINARY_NAME}-linux-amd64.tar.gz" "${BINARY_NAME}-linux-amd64"
|
||||||
|
rm "${BINARY_NAME}-linux-amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload workflow artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.goos }}-amd64
|
||||||
|
path: |
|
||||||
|
dist/*.zip
|
||||||
|
dist/*.tar.gz
|
||||||
|
|
||||||
|
# Optional: publish release assets if this is a tag push
|
||||||
|
release:
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-fast
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: ./dist
|
||||||
|
|
||||||
|
- name: Create / Update release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}
|
||||||
|
with:
|
||||||
|
name: "Release ${{ github.ref_name }}"
|
||||||
|
tag_name: ${{ github.ref_name }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
files: |
|
||||||
|
dist/**/wol-server-*.zip
|
||||||
|
dist/**/wol-server-*.tar.gz
|
38
compose.yml
38
compose.yml
@@ -2,31 +2,35 @@ services:
|
|||||||
api:
|
api:
|
||||||
image: git.send.nrw/sendnrw/edge-wol:latest
|
image: git.send.nrw/sendnrw/edge-wol:latest
|
||||||
container_name: edgewol
|
container_name: edgewol
|
||||||
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/edgewol/machines.json:/data/machines.json
|
- /docker/edgewol/machines.json:/data/machines.json
|
||||||
labels:
|
#labels:
|
||||||
- traefik.enable=true
|
#- traefik.enable=true
|
||||||
- traefik.http.routers.edgewol.rule=Host(`edgewol.b1tsblog.org`)
|
#- traefik.http.routers.edgewol.rule=Host(`edgewol.b1tsblog.org`)
|
||||||
- traefik.http.services.edgewol.loadbalancer.server.port=8080
|
#- traefik.http.services.edgewol.loadbalancer.server.port=8080
|
||||||
- traefik.http.routers.edgewol.entrypoints=websecure
|
#- traefik.http.routers.edgewol.entrypoints=websecure
|
||||||
- traefik.http.routers.edgewol.tls=true
|
#- traefik.http.routers.edgewol.tls=true
|
||||||
- traefik.http.routers.edgewol.tls.certresolver=letsencrypt
|
#- traefik.http.routers.edgewol.tls.certresolver=letsencrypt
|
||||||
- traefik.http.middlewares.edgewol-redirect.redirectscheme.scheme=https
|
#- traefik.http.middlewares.edgewol-redirect.redirectscheme.scheme=https
|
||||||
- traefik.http.middlewares.edgewol-redirect.redirectscheme.permanent=true
|
#- traefik.http.middlewares.edgewol-redirect.redirectscheme.permanent=true
|
||||||
- traefik.http.routers.edgewol0.rule=Host(`edgewol.b1tsblog.org`)
|
#- traefik.http.routers.edgewol0.rule=Host(`edgewol.b1tsblog.org`)
|
||||||
- traefik.http.routers.edgewol0.entrypoints=web
|
#- traefik.http.routers.edgewol0.entrypoints=web
|
||||||
- traefik.http.routers.edgewol0.middlewares=edgewol-redirect
|
#- traefik.http.routers.edgewol0.middlewares=edgewol-redirect
|
||||||
- traefik.protocol=http
|
#- traefik.protocol=http
|
||||||
networks:
|
network_mode: host
|
||||||
- traefik-net
|
#networks:
|
||||||
|
#- traefik-net
|
||||||
environment:
|
environment:
|
||||||
# HIER BEARBEITEN
|
# HIER BEARBEITEN
|
||||||
EW_USERNAME: groot
|
EW_USERNAME: groot
|
||||||
EW_PASSWORD: ""
|
EW_PASSWORD: ""
|
||||||
EW_PRODUCTIVE: true
|
EW_PRODUCTIVE: true
|
||||||
|
EW_DB: /data/machines.json
|
||||||
|
TZ: Europe/Berlin
|
||||||
# Sollten Ports extern verfügbar gemacht werden müssen (nicht empfohlen)
|
# Sollten Ports extern verfügbar gemacht werden müssen (nicht empfohlen)
|
||||||
#ports:
|
ports:
|
||||||
#- "8080:8080" # <host>:<container>
|
- "8080:8080" # <host>:<container>
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# Newt-Client für eine Pangolin-Integration
|
# Newt-Client für eine Pangolin-Integration
|
||||||
#newt:
|
#newt:
|
||||||
|
Reference in New Issue
Block a user