Skip to content

Commit 3cc2677

Browse files
Separate run action job into another workflow
1 parent 13d8ecf commit 3cc2677

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,6 @@ jobs:
2727
- name: Lint
2828
run: ls package-lock.json && npm run lint || yarn lint
2929

30-
run-action:
31-
runs-on: ubuntu-latest
32-
timeout-minutes: 10
33-
steps:
34-
- uses: actions/checkout@v1
35-
- name: Cache node_modules
36-
uses: actions/cache@v1
37-
with:
38-
path: node_modules
39-
key: ${{ runner.OS }}-node_modules-${{ hashFiles('**//package-lock.json') }}
40-
restore-keys: |
41-
${{ runner.OS }}--
42-
- name: Install JS dependencies
43-
run: ls package-lock.json && npm install || yarn install
44-
- name: Build
45-
run: npm run build
46-
- name: Run action
47-
uses: ./
48-
with:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
age: '1 second'
51-
skip-tags: true
52-
5330
create-test-artifact:
5431
runs-on: ubuntu-latest
5532
timeout-minutes: 10

.github/workflows/run.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run
2+
3+
on: [push]
4+
5+
env:
6+
node_version: "12.x"
7+
8+
jobs:
9+
run-action:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ env.node_version }}
18+
- name: Cache node_modules
19+
uses: actions/cache@v1
20+
with:
21+
path: node_modules
22+
key: ${{ runner.OS }}-node_modules-${{ hashFiles('**//package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.OS }}--
25+
- name: Install JS dependencies
26+
run: ls package-lock.json && npm install || yarn install
27+
- name: Build
28+
run: npm run build
29+
- name: Run action
30+
uses: ./
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
age: '1 second'
34+
skip-tags: true

0 commit comments

Comments
 (0)