Skip to content

chore(WriterDuet): update assets (#8336) #601

chore(WriterDuet): update assets (#8336)

chore(WriterDuet): update assets (#8336) #601

Workflow file for this run

name: Assets Updater
on:
push:
branches:
- main
paths:
- "**.ts"
- "**.json"
jobs:
update:
if: github.repository_owner == 'PreMiD'
name: Update Assets
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/[email protected]
with:
node-version: 16
cache: npm
- name: Install dependencies
run: HUSKY=0 npm ci
- name: Start assets updater
env:
CDN_TOKEN: ${{ secrets.CDN_TOKEN }}
run: |
git config --global core.quotePath false
git config --global core.precomposeunicode true
npm run assetsUpdater push
npm run format
npm run bumpChanged uncommitted
- name: Commit any changes
if: always()
run: |
git add .;
if git diff-index --quiet HEAD --; then
exit 0;
else
git config --local user.email "${GITHUB_EMAIL}";
git config --local user.name "${GITHUB_USER}";
branch=semid/au/`date +%F-%H-%M`;
git checkout -b $branch;
git commit -sam "chore: update assets";
git push -u origin $branch;
gh pr create --fill --base main --head $branch --title "chore: update assets" --body "*beep boop* I've updated some assets...";
fi
env:
GITHUB_USER: SeMiD
GITHUB_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.AUTOMERGE }}