[pull] master from Keycapsss:master #2
This file contains hidden or 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: Optimize New Images | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/content/keyboards/**/*.md' | |
| permissions: | |
| contents: write | |
| jobs: | |
| download-and-optimize: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run Image Downloader | |
| run: node scripts/download_images.mjs | |
| - name: Commit Changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: '🤖 optimize: download and resize remote images' | |
| file_pattern: 'src/content/keyboards/**' |