generated from atls-lab/template
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.58 KB
/
tools.yaml
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
62
63
64
name: Reusable tools
on:
workflow_call:
inputs:
node-version:
description: 'Node version to run this workflow. Default: 19'
default: '19'
required: false
type: string
version:
description: 'Tools yarn version'
type: string
required: true
secrets:
patToken:
required: true
jobs:
update:
name: Update Tools
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
- name: Yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install
- name: Update
run: yarn set version from tag ${{ inputs.version }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'feat: update tools'
title: 'feat: update tools'
branch-suffix: random
delete-branch: true
body: |
Update tools to ${{ inputs.version }}.