Skip to content

Commit abeae41

Browse files
committed
fix(github-actions): Fixed github actions.
1 parent 38e42a5 commit abeae41

File tree

4 files changed

+66
-28
lines changed

4 files changed

+66
-28
lines changed

.github/workflows/add-to-project.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/build-lint-test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
git fetch origin pull/$GH_PR_NUM/head:tmp
1515
git checkout tmp
1616
fi
17-
- uses: actions/setup-node@v1
17+
- uses: actions/setup-node@v3
1818
with:
19-
node-version: '14'
19+
node-version: '16'
2020
- uses: actions/cache@v2
2121
id: yarn-cache
2222
name: Cache npm deps
@@ -50,9 +50,9 @@ jobs:
5050
git fetch origin pull/$GH_PR_NUM/head:tmp
5151
git checkout tmp
5252
fi
53-
- uses: actions/setup-node@v1
53+
- uses: actions/setup-node@v3
5454
with:
55-
node-version: '14'
55+
node-version: '16'
5656
- uses: actions/cache@v2
5757
id: yarn-cache
5858
name: Cache npm deps
@@ -87,9 +87,9 @@ jobs:
8787
git fetch origin pull/$GH_PR_NUM/head:tmp
8888
git checkout tmp
8989
fi
90-
- uses: actions/setup-node@v1
90+
- uses: actions/setup-node@v3
9191
with:
92-
node-version: '14'
92+
node-version: '16'
9393
- uses: actions/cache@v2
9494
id: yarn-cache
9595
name: Cache npm deps
@@ -128,9 +128,9 @@ jobs:
128128
git fetch origin pull/$GH_PR_NUM/head:tmp
129129
git checkout tmp
130130
fi
131-
- uses: actions/setup-node@v1
131+
- uses: actions/setup-node@v3
132132
with:
133-
node-version: '14'
133+
node-version: '16'
134134
- uses: actions/cache@v2
135135
id: yarn-cache
136136
name: Cache npm deps

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build
2+
on:
3+
workflow_call:
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
env:
8+
GH_PR_NUM: ${{ github.event.number }}
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: |
12+
if [[ ! -z "${GH_PR_NUM}" ]]; then
13+
echo "Checking out PR"
14+
git fetch origin pull/$GH_PR_NUM/head:tmp
15+
git checkout tmp
16+
fi
17+
- uses: actions/cache@v2
18+
id: setup-cache
19+
name: Cache setup
20+
with:
21+
path: |
22+
README.md
23+
package.json
24+
.tmplr.yml
25+
packages/*/package.json
26+
packages/*/patternfly-docs/content/**
27+
packages/*/patternfly-docs/generated/**
28+
key: ${{ runner.os }}-setup-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package.json', 'packages/module/package.json') }}
29+
- name: Run build script
30+
run: ./devSetup.sh
31+
shell: bash
32+
if: steps.setup-cache.outputs.cache-hit != 'true'
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: '16'
36+
- uses: actions/cache@v2
37+
id: yarn-cache
38+
name: Cache npm deps
39+
with:
40+
path: |
41+
node_modules
42+
**/node_modules
43+
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
44+
- run: yarn install --frozen-lockfile
45+
if: steps.yarn-cache.outputs.cache-hit != 'true'
46+
- uses: actions/cache@v2
47+
id: dist
48+
name: Cache dist
49+
with:
50+
path: |
51+
packages/*/dist
52+
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
53+
- name: Build dist
54+
run: yarn build
55+
if: steps.dist.outputs.cache-hit != 'true'

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1414
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515
steps:
16-
- uses: actions/setup-node@v1
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v3
1718
with:
18-
node-version: '14'
19+
node-version: '16'
1920
- uses: actions/cache@v2
2021
id: yarn-cache
2122
name: Cache npm deps

0 commit comments

Comments
 (0)