setting up
This commit is contained in:
37
.gitea/workflows/bundle.yml
Normal file
37
.gitea/workflows/bundle.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: bundle
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "22 9 * * *" # daily 09:22 UTC
|
||||
|
||||
jobs:
|
||||
bundle:
|
||||
runs-on: [debian-13]
|
||||
steps:
|
||||
- name: Checkout knoxmakers-inkscape
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure git identity
|
||||
run: |
|
||||
git config user.name "haxbot"
|
||||
git config user.email "haxbot@knoxmakers.sh"
|
||||
|
||||
- name: Run bundle script
|
||||
run: |
|
||||
bash scripts/bundle.sh
|
||||
|
||||
- name: Push (if a bundle update commit was created)
|
||||
env:
|
||||
HAXBOT_TOKEN: ${{ secrets.HAXBOT_TOKEN }}
|
||||
run: |
|
||||
if git log -1 --pretty=%B | grep -q '^bundle: update'; then
|
||||
REPO_URL="https://x-access-token:${HAXBOT_TOKEN}@git.knoxmakers.org/KnoxMakers/knoxmakers-inkscape.git"
|
||||
git remote set-url origin "$REPO_URL"
|
||||
git push origin HEAD:main
|
||||
else
|
||||
echo "No update commit created."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user