Update Zudoku #6
This file contains 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: Update Zudoku | |
on: | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
# This can only be triggered from main | |
if: github.ref == 'refs/heads/main' | |
steps: | |
# Must create the token first as the checkout step needs to use this token | |
- name: Generate a token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.INTEGRATIONS_APP_ID }} | |
private-key: ${{ secrets.INTEGRATIONS_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
registry-url: "https://registry.npmjs.org" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install | |
- run: npm i zudoku@latest | |
- run: git config --global user.email "zudoku-bot@zuplo.com" | |
- run: git config --global user.name "Zudoku Bot" | |
- name: Commit and push if there are changes | |
run: | | |
git add -A | |
git diff --staged --quiet || (git commit -m "Updated Zudoku Package" && git push origin main) | |
env: | |
GH_TOKEN: ${{ steps.generate-token.outputs.token }} |