forked from XGovFormBuilder/digital-form-builder
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (49 loc) · 1.65 KB
/
dependabot.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Dependabot
on:
workflow_call:
secrets:
DEPENDABOT_PAT:
description: 'PAT to commit changes'
required: false
jobs:
update-branch:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
with:
# Using a Personal Access Token here is required to trigger workflows on our new commit.
# The default GitHub token doesn't trigger any workflows.
# See: https://github.community/t/push-from-action-does-not-trigger-subsequent-action/16854/2
token: ${{ secrets.DEPENDABOT_PAT }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- run: git lfs pull --include .yarn/
- name: Setup node
uses: actions/[email protected]
with:
node-version: 16.x
- name: Restore cache
uses: actions/[email protected]
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- run: git checkout HEAD~1 yarn.lock
- run: yarn config set -H enableImmutableInstalls false
- run: yarn install --mode=skip-build
- run: yarn dedupe
- name: Commit yarn.lock
run: |
git config user.name "dependabot-fix"
git config user.email "[email protected]"
git add yarn.lock
git commit -m '[dependabot skip] Fix yarn.lock'
git push
skip-update-branch:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: dependabot update skipped
run: |
echo "skipped"