Check updates of reveal.js #319
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: Check updates of reveal.js | |
on: | |
schedule: | |
- cron: '30 0 * * *' | |
workflow_dispatch: | |
jobs: | |
update-revealjs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Try update package.json | |
id: checked | |
run: | | |
version=`jq < npm-shrinkwrap.json '.packages."node_modules/reveal.js".version' -r` | |
echo "::set-output name=revealjs_current::${version}" | |
npm i | |
npm update -S | |
version=`jq < npm-shrinkwrap.json '.packages."node_modules/reveal.js".version' -r` | |
echo "::set-output name=revealjs_updated::${version}" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
branch: update/revealjs-${{ steps.checked.outputs.revealjs_updated }} | |
commit-message: "build(deps): Use latest Reveal.js" | |
title: "Update reveal.js from v${{ steps.checked.outputs.revealjs_current }} to ${{ steps.checked.outputs.revealjs_updated }}" | |
delete-branch: true | |
body: | | |
Please see [changelog of reveal.js](https://github.com/hakimel/reveal.js/releases/tag/${{ steps.checked.outputs.revealjs_updated}}) | |
Auto-generated by GitHub Actions |