Skip to content

chore: batch update #234

chore: batch update

chore: batch update #234

Workflow file for this run

name: Validate
on: [push, pull_request]
permissions: "read-all"
jobs:
validate:
if: "(!contains(github.event.commits[0].message, '[skip ci]')) && (!contains(github.event.commits[0].message, '[ci skip]'))"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Check suimu
id: check-suimu
uses: actions/github-script@v6
with:
script: |
let lastRel = await github.rest.repos.getLatestRelease({
owner: "suisei-cn",
repo: "suimu",
})
let downloadUrl = lastRel.data.assets.filter(x => x.name === "suimu-Linux").map(x => x.browser_download_url)
if (downloadUrl.length === 0) throw Error("No valid suimu-Linux found!")
return downloadUrl[0]
- name: Download suimu
run: |
wget ${{ steps.check-suimu.outputs.result }} -O suimu
chmod +x ./suimu
- name: Check CSV
run: ./suimu check ./suisei-music.csv
deploy:
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
needs: validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Invoke remote
env:
BIN_API_KEY: ${{ secrets.BIN_API_KEY }}
GITHUB_SHA: ${{ github.sha }}
run: |
cd tools
npm install got
node deploy.mjs