Skip to content

feat(AntiRaid): add activity (#10445) #1070

feat(AntiRaid): add activity (#10445)

feat(AntiRaid): add activity (#10445) #1070

name: Assets Updater
on:
push:
branches:
- main
paths:
- '**.ts'
- '**.json'
jobs:
check-and-run:
if: github.repository_owner == 'PreMiD'
name: Update assets
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- name: Install pmd
run: npm ci
- name: Update assets
env:
CDN_TOKEN: ${{ secrets.CDN_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
# Configure git
git config --local user.email "250752185+dimerp[bot]@users.noreply.github.com"
git config --local user.name "DiMerP[bot]"
# Run PMD update-assets command
npx pmd update-assets