blob: d86575d91e59fa5021dc4871abe6f6f68ca86221 [file]
name: Update emsdk
on:
workflow_dispatch:
# Trigger every day at 3.30 AM PST (= 10:30 AM UTC)
schedule:
- cron: "30 10 * * *"
permissions:
contents: write
pull-requests: write
jobs:
update-emsdk:
name: Update emsdk
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
steps:
- name: Install emsdk
uses: emscripten-core/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16
with:
version: tot
- name: Set EM_CONFIG
run:
echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV
- name: Checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
submodules: true
- name: pip install
run: |
which python3
python3 --version
python3 -m pip install -r requirements-dev.txt
- name: Update emsdk and rebaseline tests
env:
REF_NAME: ${{ github.ref_name }}
run: |
git config user.name emscripten-bot
git config user.email emscripten-bot@users.noreply.github.com
./bootstrap.py
if ./tools/maint/rebaseline_tests.py --new-branch --update-emsdk; then
echo "rebaseline_tests returned zero, emsdk version up-to-date"
# Exit early and don't create a PR
exit 0
else
code=$?
if [[ $code != 2 ]] ; then
echo "rebaseline_tests.py failed with unexpected error $code (expected 2)"
exit 1
fi
fi
git push origin update_emsdk
gh pr create --fill --base "$REF_NAME" --reviewer sbc100,kripken
gh pr merge --squash --auto