name: Build Extensions on: push: branches: [main] schedule: - cron: "0 0 * * *" jobs: build: runs-on: ubuntu-latest if: github.event_name != 'push' || ( startsWith(github.event.head_commit.message, 'chore(extensions') || startsWith(github.event.head_commit.message, 'build(extensions') ) steps: - uses: actions/checkout@v4 with: submodules: "true" - name: Use Node.js 21.x uses: actions/setup-node@v4 with: node-version: 21.x - name: Install tools run: | sudo apt-get update; sudo apt-get install -y jq libarchive-dev gnupg; cd /tmp; git clone https://github.com/wahern/tarsum --depth=1; cd tarsum; make; sudo cp tarsum /usr/bin/tarsum; rm -fr /tmp/tarsum; - name: Build main project run: ./blazew build - name: Build extensions run: | cd extensions; bash ../scripts/build-extensions.sh; - name: Build index run: node scripts/extensions.js --mkindex - name: Prepare GPG keys for importing run: echo "${{ secrets.COMMIT_GPG_KEY }}" > private.key - name: Import GPG key run: gpg --import private.key - name: Cleanup after importing GPG key run: rm -f private.key - name: Commit and Push Changes run: | git config --global user.email "rakinar2@onesoftnet.eu.org" git config --global user.name "Ar Rakin" git config --global user.signingkey "6AE7B08C68169452" git config --global commit.gpgsign true git add extensions git commit -sm "chore(extensions): build extensions [skip ci]" git config pull.rebase false git pull origin main git push origin HEAD:main