commit e6d852704fb5976ae336ecf38c2e1b14cf690fa4 Author: sesh Date: Wed Jun 24 23:17:36 2026 +0200 Add .gitea/workflows/reskin.yaml diff --git a/.gitea/workflows/reskin.yaml b/.gitea/workflows/reskin.yaml new file mode 100644 index 0000000..bd650e6 --- /dev/null +++ b/.gitea/workflows/reskin.yaml @@ -0,0 +1,55 @@ +name: anubis-reskin +on: + schedule: [{ cron: '17 6 * * *' }] + workflow_dispatch: + +env: + UPSTREAM: TecharoHQ/anubis + IMAGE: git.kernel.rip/sesh/anubis + REGISTRY: git.kernel.rip + +jobs: + reskin: + runs-on: ubuntu-latest + steps: + - name: Latest upstream tag + id: up + run: echo "tag=$(curl -fsSL https://api.github.com/repos/$UPSTREAM/releases/latest | jq -r .tag_name)" >>"$GITHUB_OUTPUT" + + - uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REG_USER }} + password: ${{ secrets.REG_TOKEN }} + + - name: Skip if already built + id: check + run: | + docker manifest inspect "$IMAGE:${{ steps.up.outputs.tag }}" >/dev/null 2>&1 \ + && echo "build=false" >>"$GITHUB_OUTPUT" \ + || echo "build=true" >>"$GITHUB_OUTPUT" + + - if: steps.check.outputs.build == 'true' + uses: actions/checkout@v4 # overlay repo + + - if: steps.check.outputs.build == 'true' + uses: actions/checkout@v4 + with: { repository: "${{ env.UPSTREAM }}", ref: "${{ steps.up.outputs.tag }}", path: upstream } + + - if: steps.check.outputs.build == 'true' + name: Overlay + drift guard + run: | + for f in happy pensive reject; do + test -f "upstream/web/static/img/$f.webp" || { echo "::error::missing $f.webp upstream"; exit 1; } + done + cp mascot/*.webp upstream/web/static/img/ + + - if: steps.check.outputs.build == 'true' + working-directory: upstream + run: | + docker buildx create --use --name b 2>/dev/null || docker buildx use b + docker buildx bake --print # run once to find the app target name + docker buildx bake \ + --set .platform=linux/amd64 \ + --set .tags="$IMAGE:${{ steps.up.outputs.tag }},$IMAGE:latest" \ + --push \ No newline at end of file