Update .gitea/workflows/reskin.yaml
This commit is contained in:
@@ -2,12 +2,10 @@ name: anubis-reskin
|
|||||||
on:
|
on:
|
||||||
schedule: [{ cron: '17 6 * * *' }]
|
schedule: [{ cron: '17 6 * * *' }]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
UPSTREAM: TecharoHQ/anubis
|
UPSTREAM: TecharoHQ/anubis
|
||||||
IMAGE: git.kernel.rip/sesh/anubis
|
IMAGE: git.kernel.rip/sesh/anubis
|
||||||
REGISTRY: git.kernel.rip
|
REGISTRY: git.kernel.rip
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
reskin:
|
reskin:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -15,27 +13,24 @@ jobs:
|
|||||||
- name: Latest upstream tag
|
- name: Latest upstream tag
|
||||||
id: up
|
id: up
|
||||||
run: echo "tag=$(curl -fsSL https://api.github.com/repos/$UPSTREAM/releases/latest | jq -r .tag_name)" >>"$GITHUB_OUTPUT"
|
run: echo "tag=$(curl -fsSL https://api.github.com/repos/$UPSTREAM/releases/latest | jq -r .tag_name)" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ secrets.REG_USER }}
|
username: ${{ secrets.REG_USER }}
|
||||||
password: ${{ secrets.REG_TOKEN }}
|
password: ${{ secrets.REG_TOKEN }}
|
||||||
|
|
||||||
- name: Skip if already built
|
- name: Skip if already built
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
docker manifest inspect "$IMAGE:${{ steps.up.outputs.tag }}" >/dev/null 2>&1 \
|
docker manifest inspect "$IMAGE:${{ steps.up.outputs.tag }}" >/dev/null 2>&1 \
|
||||||
&& echo "build=false" >>"$GITHUB_OUTPUT" \
|
&& echo "build=false" >>"$GITHUB_OUTPUT" \
|
||||||
|| echo "build=true" >>"$GITHUB_OUTPUT"
|
|| echo "build=true" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- if: steps.check.outputs.build == 'true'
|
- if: steps.check.outputs.build == 'true'
|
||||||
uses: actions/checkout@v4 # overlay repo
|
uses: actions/checkout@v4 # overlay repo
|
||||||
|
|
||||||
- if: steps.check.outputs.build == 'true'
|
- if: steps.check.outputs.build == 'true'
|
||||||
uses: actions/checkout@v4
|
name: Checkout upstream at tag
|
||||||
with: { repository: "${{ env.UPSTREAM }}", ref: "${{ steps.up.outputs.tag }}", path: upstream }
|
run: |
|
||||||
|
git clone --depth 1 --branch "${{ steps.up.outputs.tag }}" \
|
||||||
|
https://github.com/TecharoHQ/anubis.git upstream
|
||||||
- if: steps.check.outputs.build == 'true'
|
- if: steps.check.outputs.build == 'true'
|
||||||
name: Overlay + drift guard
|
name: Overlay + drift guard
|
||||||
run: |
|
run: |
|
||||||
@@ -43,7 +38,6 @@ jobs:
|
|||||||
test -f "upstream/web/static/img/$f.webp" || { echo "::error::missing $f.webp upstream"; exit 1; }
|
test -f "upstream/web/static/img/$f.webp" || { echo "::error::missing $f.webp upstream"; exit 1; }
|
||||||
done
|
done
|
||||||
cp mascot/*.webp upstream/web/static/img/
|
cp mascot/*.webp upstream/web/static/img/
|
||||||
|
|
||||||
- if: steps.check.outputs.build == 'true'
|
- if: steps.check.outputs.build == 'true'
|
||||||
working-directory: upstream
|
working-directory: upstream
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user