Update Bokeh #33
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: "Update Bokeh" | |
on: | |
schedule: | |
# Run job at 9:30am PST or 10:30am PDT on Tuesdays | |
- cron: "30 17 * * 2" | |
# Allows the check to be manually triggered | |
workflow_dispatch: | |
jobs: | |
update-bokeh: | |
runs-on: ubuntu-latest | |
# Ensure we can push back to the repository | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
ref: "main" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Enable and Prepare Yarn | |
run: | | |
corepack enable | |
cd streamlit_bokeh/frontend | |
corepack install | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache-dependency-path: "**/yarn.lock" | |
- name: Install dependencies | |
run: pip install requests semver | |
- name: Run script | |
id: compare_bokeh | |
run: python scripts/update_bokeh_version.py | |
# Just updates the yarn.lock file for committing | |
- name: Run yarn install | |
if: steps.compare_bokeh.outputs.needs_update == 'true' | |
id: yarn_install | |
run: | | |
cd streamlit_bokeh/frontend | |
yarn install --immutable | |
- name: Create Pull Request | |
if: steps.compare_bokeh.outputs.needs_update == 'true' | |
id: create_pr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: "release/${{ steps.compare_bokeh.outputs.new_version }}" | |
base: main | |
add-paths: "." | |
commit-message: "Update Bokeh to ${{ steps.compare_bokeh.outputs.new_bokeh_version }} and release ${{ steps.compare_bokeh.outputs.new_version }}" | |
title: "Release ${{ steps.compare_bokeh.outputs.new_version }} with Bokeh version ${{ steps.compare_bokeh.outputs.new_bokeh_version }}" | |
body: "This PR updates Bokeh to version ${{ steps.compare_bokeh.outputs.new_bokeh_version }}. and releases it as ${{ steps.compare_bokeh.outputs.new_version }}" | |
- name: Successful Update Bokeh Slack Message | |
if: steps.create_pr.outputs.pull-request-url != '' | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
RUN_ID: ${{ github.run_id }} | |
run: python scripts/slack_notification.py update-bokeh success ${{ steps.create_pr.outputs.pull-request-url }} | |
- name: Failed Update Bokeh Slack Message | |
if: failure() | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
RUN_ID: ${{ github.run_id }} | |
run: python scripts/slack_notification.py update-bokeh failure |