Skip to content

Commit 6c7f657

Browse files
authored
Merge pull request #369 from manosim/prs-run-ci
Run GitHub actions on PRs from forks
2 parents 436b7df + 669d314 commit 6c7f657

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
name: CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
setup:
77
runs-on: ubuntu-18.04
88

99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v2
1111

12-
- name: Get yarn cache
13-
id: yarn-cache
14-
run: echo "::set-output name=dir::$(yarn cache dir)"
12+
- name: Get yarn cache
13+
id: yarn-cache
14+
run: echo "::set-output name=dir::$(yarn cache dir)"
1515

16-
- uses: actions/cache@v1
17-
with:
18-
path: ${{ steps.yarn-cache.outputs.dir }}
19-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20-
restore-keys: |
21-
${{ runner.os }}-yarn-
16+
- uses: actions/cache@v1
17+
with:
18+
path: ${{ steps.yarn-cache.outputs.dir }}
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-
2222
23-
- name: Install Dependencies
24-
run: yarn install
23+
- name: Install Dependencies
24+
run: yarn install
2525

2626
run-unit-tests:
2727
runs-on: ubuntu-18.04
2828
needs: setup
2929

3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v2
3232

33-
- name: Get yarn cache
34-
id: yarn-cache
35-
run: echo "::set-output name=dir::$(yarn cache dir)"
33+
- name: Get yarn cache
34+
id: yarn-cache
35+
run: echo "::set-output name=dir::$(yarn cache dir)"
3636

37-
- name: Install Dependencies
38-
run: yarn install
37+
- name: Install Dependencies
38+
run: yarn install
3939

40-
- name: Run Prettier (Check)
41-
run: yarn prettier-check
40+
- name: Run Prettier (Check)
41+
run: yarn prettier-check
4242

43-
- name: Run Jest
44-
run: yarn test --coverage --runInBand
43+
- name: Run Jest
44+
run: yarn test --coverage --runInBand
4545

4646
build-macos:
4747
runs-on: macos-10.15
4848
needs: setup
4949

5050
steps:
51-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v2
5252

53-
- name: Get yarn cache
54-
id: yarn-cache
55-
run: echo "::set-output name=dir::$(yarn cache dir)"
53+
- name: Get yarn cache
54+
id: yarn-cache
55+
run: echo "::set-output name=dir::$(yarn cache dir)"
5656

57-
- name: Install Dependencies
58-
run: yarn install
57+
- name: Install Dependencies
58+
run: yarn install
5959

60-
- name: Build
61-
run: yarn build
60+
- name: Build
61+
run: yarn build
6262

63-
- name: Pack (electron-builder)
64-
run: yarn pack
63+
- name: Pack (electron-builder)
64+
run: yarn pack
6565

66-
- name: Make macOS (electron-builder)
67-
env:
68-
CSC_LINK: ${{ secrets.mac_certs }}
69-
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
70-
run: yarn make:macos
66+
- name: Make macOS (electron-builder)
67+
env:
68+
CSC_LINK: ${{ secrets.mac_certs }}
69+
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
70+
run: yarn make:macos
7171

72-
- name: Clean up builds
73-
run: rm -rfv dist/mac dist/Gitify-*.dmg*
72+
- name: Clean up builds
73+
run: rm -rfv dist/mac dist/Gitify-*.dmg*
7474

75-
- uses: actions/upload-artifact@v1
76-
with:
77-
name: Gitify-dist
78-
path: dist
75+
- uses: actions/upload-artifact@v1
76+
with:
77+
name: Gitify-dist
78+
path: dist

0 commit comments

Comments
 (0)