Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/UPDATE_BUILTINS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: UPDATE_BUILTINS
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '17 2 * * 0' # Every Sunday at 2:17 AM (random time to distribute load)
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 20 ]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup project
uses: bpmn-io/actions/setup@latest
- name: Checkout camunda-docs
uses: actions/checkout@v4
with:
repository: camunda/camunda-docs
path: camunda-docs
- name: Update builtins
run: npm run compile-builtins
- name: All
run: npm run all
- name: Check if files changed
id: check_builtins
run: |
files=$(git status -u --porcelain)
if [ -n "$files" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Debug
run: |
echo changed: ${{ steps.check_builtins.outputs.changed }}
echo eventname: ${{ github.event_name }}
echo eventtype: ${{ github.event.action }}
echo prtype: ${{ github.event.action }}
echo base: ${{ github.event.pull_request.base.ref }}
- name: Add comment on PRs
if: steps.check_builtins.outputs.changed == 'true' && github.event_name == 'pull_request' && github.event.action == 'opened'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
BODY: |
This PR would lead to changes in the repo. Consider if you want to include all changes in this PR or if there's already a PR that includes these changes.
run: gh issue comment "$NUMBER" --body "$BODY"
- name: Create PRs automatically
if: steps.check_builtins.outputs.changed == 'true' && (github.event_name == 'scheduled' || github.event_name == 'workflow_dispatch')
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: update builtins'
branch: update-builtins
title: 'Update builtins'
body: |
:robot: Automated PR to update builtin functions