-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.65 KB
/
update-shared.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
name: Update Shared Client Version
on:
workflow_call:
inputs:
repo-path:
required: true
type: string
repo-ref:
required: true
type: string
working-directory:
required: false
type: string
cache-dependency-path:
required: true
type: string
client-hash:
required: true
type: string
secrets:
token:
required: true
jobs:
update-web:
runs-on: ubuntu-latest
steps:
- name: Check out dependent Git repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-path }}
ref: ${{ inputs.repo-ref }}
token: ${{ secrets.token }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.tool-versions'
cache: 'npm'
cache-dependency-path: ${{ inputs.cache-dependency-path }}
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
# running npm install without --no-package-lock causes extra diffs in the package-lock.json
# and causes npx graphql-code-generator to fail
run: |
npm install "github:techmatters/terraso-client-shared#${{ inputs.client-hash }}" --no-package-lock
npm install
- name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "package.json package-lock.json"
commit_message: "build: update shared client to ${{ inputs.client-hash }}"
commit_user_name: "GitHub Actions"
commit_user_email: [email protected]