Skip to content

Commit

Permalink
Generate snippets from latest test release (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
okdistribute authored Apr 3, 2022
1 parent 16dcb33 commit 8064f27
Show file tree
Hide file tree
Showing 27 changed files with 1,732 additions and 4,146 deletions.
42 changes: 42 additions & 0 deletions .github/rebuild-snippets.yml
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 }}
Loading

0 comments on commit 8064f27

Please sign in to comment.