forked from joe-trellick/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate snippets from latest test release (#144)
- Loading branch information
1 parent
16dcb33
commit 8064f27
Showing
27 changed files
with
1,732 additions
and
4,146 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: rebuild-snippets | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
push: | ||
branches: [master] | ||
# Whenever there is a new `ditto` release and, with it, an update of the `releases.json` file. | ||
repository_dispatch: | ||
types: ['new-ditto-release'] | ||
|
||
jobs: | ||
create-pull-request: | ||
name: Update snippets | ||
runs-on: ubuntu-latest | ||
environment: rebuild-snippets | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Checkout ditto repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: getditto/ditto | ||
token: ${{ secrets.GH_PAT }} | ||
path: ditto | ||
- name: Generate snippets | ||
run: | ||
npm i | ||
node ./bin/generate-snippets ./ditto snippets.json | ||
git add snippets.json | ||
git commit -m "Update snippets from latest ditto release" | ||
- uses: repo-sync/pull-request@v2 | ||
name: pull-request | ||
with: | ||
destination_branch: "master" | ||
pr_title: "Updating snippets from latest ditto release" | ||
pr_body: "👑 *An automated PR*" | ||
pr_reviewer: "okdistribute" | ||
pr_draft: false | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.