This repository was archived by the owner on Jul 12, 2025. It is now read-only.
Update build-stable.yml #4
Workflow file for this run
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: Convert Logo to Image Raw | |
| on: | |
| push: | |
| paths: | |
| - 'logo-128.bmp' | |
| workflow_dispatch: | |
| jobs: | |
| convert: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.UPLOAD_TOKEN }} | |
| - name: Install ImageMagick | |
| run: | | |
| sudo apt update | |
| sudo apt install -y imagemagick | |
| - name: Convert logo-128.bmp to image.raw | |
| run: | | |
| if [ -f logo-128.bmp ]; then | |
| convert logo-128.bmp -resize 320x200 -depth 8 -colors 256 rgb:image.raw | |
| else | |
| echo "Warning: logo-128.bmp not found. Creating placeholder image.raw." | |
| # Create a placeholder image.raw (black with blue rectangle) | |
| dd if=/dev/zero of=image.raw bs=1 count=64000 2>/dev/null | |
| printf '\x01' | dd of=image.raw bs=1 seek=32100 count=50 conv=notrunc 2>/dev/null | |
| fi | |
| - name: Commit and push image.raw | |
| run: | | |
| git config --global user.name "GitHub Action" | |
| git config --global user.email "action@github.com" | |
| git add image.raw | |
| git diff --staged --quiet || git commit -m "Update image.raw from logo-128.bmp" | |
| git push origin stable | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.UPLOAD_TOKEN }} |