Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update commands GHA #97

Merged
merged 8 commits into from
Oct 25, 2022
Merged
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
31 changes: 31 additions & 0 deletions .github/workflows/update-commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update tool commands list for Prismjs
on:
schedule:
- cron: '0 10 * * 1-5'

jobs:
fetch-commands:
name: Run script to fetch commands
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- uses: iterative/setup-cml@v1

- name: Install required package
run: yarn workspace @dvcorg/gatsby-theme-iterative add isomorphic-fetch

- name: Fetch commands
run: yarn get-commands all

- name: Check
run: |
if [[ `git status packages/gatsby-theme-iterative/config/prismjs --porcelain` ]]; then
cml pr create packages/gatsby-theme-iterative/config/prismjs --title "Update tool commands"
else
echo "No changes!"
fi
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}