Skip to content

Sync Files

Sync Files #58

Workflow file for this run

name: Sync Files
on:
push:
branches: [main]
paths:
- "template/**"
- "tests/**"
- ".github/workflows/sync.yml"
- ".github/scripts/sync.sh"
schedule:
# Run daily at midnight UTC to keep downstream repositories in sync
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test sync script
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Lua
uses: luarocks/gh-actions-lua@master
with:
luaVersion: "5.5"
- name: Install LuaRocks
uses: luarocks/gh-actions-luarocks@master
- name: Install StyLua
run: npm install -g @johnnymorganz/stylua-bin
- name: Run sync tests
run: bash tests/run_tests.sh
sync:
name: Sync Files
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Lua
uses: luarocks/gh-actions-lua@master
with:
luaVersion: "5.5"
- name: Install LuaRocks
uses: luarocks/gh-actions-luarocks@master
- name: Install StyLua
run: npm install -g @johnnymorganz/stylua-bin
- name: Sync template files to downstream repositories
run: bash .github/scripts/sync.sh
env:
GH_TOKEN: ${{ secrets.GH_PAT }}