Skip to content

Update LMS Server Repository #1070

Update LMS Server Repository

Update LMS Server Repository #1070

name: Update LMS Server Repository
on:
schedule:
- cron: "26 */8 * * *"
workflow_dispatch:
jobs:
merge:
name: Update server repository
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm install "@aws-sdk/client-s3" jstoxml@3 dotenv@16 fast-xml-parser@4
- name: Update S3 bucket
env:
ACCESS_KEY_ID: '${{ secrets.ACCESS_KEY_ID }}'
SECRET_ACCESS_KEY: '${{ secrets.SECRET_ACCESS_KEY }}'
R2_ACCESS_KEY_ID: '${{ secrets.R2_ACCESS_KEY_ID }}'
R2_SECRET_ACCESS_KEY: '${{ secrets.R2_SECRET_ACCESS_KEY }}'
R2_ENDPOINT_URL: '${{ secrets.R2_ENDPOINT_URL }}'
run: node tools/updateRepository.mjs
- name: Commit Changes (if needed)
if: ${{ env.DEBUG == '' }}
run: |
if [ -z "$(git status --porcelain)" ]; then
echo No changes to commit
else
git config user.name "LMS Server Repository Updater"
git config user.email "[email protected]"
git add latest.xml stable.xml dev.xml servers.json
git commit -a -m "Update Server Repository ${{ github.event.inputs.version }}"
git push
fi
- name: Log Changes
if: ${{ env.DEBUG }}
run: |
git --no-pager diff
git status
bumpWebSite:
name: Bump lyrion.org to pick up latest server builds
runs-on: ubuntu-latest
needs: merge
permissions:
actions: write
steps:
- name: Update web site
env:
GH_TOKEN: ${{ secrets.DEPLOYMENT_KEY }}
run: gh workflow run main.yml -R LMS-Community/lms-community.github.io