Files
Common/.gitea/workflows/sync-assets.yml
T

52 lines
1.8 KiB
YAML

name: Asphalt Sync & Submodule Update
on:
workflow_dispatch:
schedule:
- cron: "@weekly"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Principal
uses: actions/checkout@v6
with:
submodules: "recursive"
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}
lfs: true
- name: Update Submodule to Latest And Pull LFS
run: |
git submodule update --remote --merge assets
git lfs pull
git submodule foreach git lfs pull
- name: Setup Rokit
uses: CompeyDev/setup-rokit@v0.2.1
with:
cache: true
token: ${{ secrets.GITHUB }}
- name: Asphalt Sync
env:
ASPHALT_API_KEY: ${{ secrets.ROBLOX_OPEN_CLOUD_KEY }}
run: |
asphalt sync
- name: Commit and Push Changes
run: |
git config --global http.https://git.azur.webhop.me/.extraheader "AUTHORIZATION: basic $(echo -n :${{ secrets.GITEA_TOKEN }} | base64)"
git config user.name "Gitea Bot"
git config user.email "bot@gitea.io"
git add asphalt.lock.toml places/common/src/shared/assets/assets.luau places/common/src/shared/assets/assets.d.ts assets
# On ne commit que s'il y a des changements
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: auto-sync assets and update submodule pointer"
git push origin ${{ gitea.ref }}
fi