Update LMS Server Repository #1714
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update LMS Server Repository | |
on: | |
schedule: | |
- cron: "26 */8 * * *" | |
workflow_dispatch: | |
jobs: | |
merge: | |
name: Update server repository | |
runs-on: ubuntu-24.04 | |
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-24.04 | |
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 |