generated from flotiq/gatsby-starter-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.25 KB
/
pull_requests.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: PR workflow
on: pull_request
permissions:
pull-requests: write
jobs:
test-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g gatsby-cli
- run: npm install -g flotiq-cli
- run: flotiq import .flotiq ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
- run: yarn install
- run: gatsby build
env:
GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
SNIPCART_API_KEY: 'test'
GA_MEASUREMENT_ID: ''
dependabot:
needs: test-build
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}