LoaderSpot/.github/workflows/sync-files.yml
dependabot[bot] 410305bea0
Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 03:00:16 +00:00

49 lines
1.2 KiB
YAML

name: Sync files to table
on:
push:
branches:
- main
paths:
- 'versions.json'
- 'versions_deb.json'
workflow_dispatch:
jobs:
sync-files:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source repo
uses: actions/checkout@v5
- name: Checkout target repo
uses: actions/checkout@v5
with:
repository: LoaderSpot/table
path: table
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Copy files
run: |
mkdir -p table/table
cp versions.json table/table/
cp versions_deb.json table/table/
- name: Commit and push changes
env:
TARGET_REPO: "https://${{ secrets.PERSONAL_TOKEN }}@github.com/LoaderSpot/table.git"
run: |
cd table
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
if ! git diff --exit-code; then
git add table/
git commit -m "Auto-sync from LoaderSpot"
git push "$TARGET_REPO" main
else
echo "No changes to commit"
fi