Skip to content

Merge pull request #55 from Cynosphere/mediaTweaks-1.0.4 #55

Merge pull request #55 from Cynosphere/mediaTweaks-1.0.4

Merge pull request #55 from Cynosphere/mediaTweaks-1.0.4 #55

Workflow file for this run

name: Deploy extensions
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy extensions
runs-on: ubuntu-latest
steps:
- name: Checkout extensions
uses: actions/checkout@v3
- name: Checkout dist
uses: actions/checkout@v3
with:
repository: moonlight-mod/extensions-dist
path: dist
ref: main
ssh-key: ${{ secrets.DIST_SSH_KEY }}
persist-credentials: true
- name: Checkout runner
uses: actions/checkout@v3
with:
repository: moonlight-mod/extensions-runner
path: runner
ref: main
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build runner Docker image
run: |
cd ${{ github.workspace }}/runner
docker build -t moonlight-mod/extensions-runner:latest .
cd ${{ github.workspace }}
- name: Run runner
env:
EXT_MANIFESTS_PATH: ${{ github.workspace }}/exts
EXT_DIST_PATH: ${{ github.workspace }}/dist
EXT_RUNNER_PATH: ${{ github.workspace }}/runner
EXT_WORK_PATH: ${{ github.workspace }}/work
run: |
cd $EXT_RUNNER_PATH
pnpm run runner
cd ${{ github.workspace }}
- name: Upload changed asars
uses: actions/upload-artifact@v4
with:
name: asars
path: ${{ github.workspace }}/work/changed/*.asar
- name: Commit dist
run: |
cd ${{ github.workspace }}/dist
git config user.name "moonlight-bot"
git config user.email "[email protected]"
git add .
git diff --cached --quiet && exit 0
git commit -m "Update extensions"
cd ${{ github.workspace }}
- name: Push dist
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DIST_TOKEN }}
directory: dist
repository: moonlight-mod/extensions-dist
ssh: true