forked from sensorfleet/sensorfleet.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-datasheet-update-pull-request.yml
More file actions
30 lines (27 loc) · 1 KB
/
create-datasheet-update-pull-request.yml
File metadata and controls
30 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Create pull request for updated datasheets
on:
push:
branches:
- 'autoupdate-datasheets'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
- name: Create PR using REST API
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/pulls \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"title": "Auto-update datasheets",
"body": "Created by GitHub Action",
"head": "autoupdate-datasheets",
"base": "master"
}'