Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Commit 67539e8

Browse files
committed
chore: update github action workflows
1 parent 895d56f commit 67539e8

File tree

4 files changed

+59
-22
lines changed

4 files changed

+59
-22
lines changed

.github/workflows/expo-preview.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ jobs:
55
publish:
66
name: Install and publish
77
runs-on: ubuntu-latest
8+
if: github.event.pull_request.head.repo.owner.login == 'react-native-community'
89
steps:
910
- name: Checkout
1011
uses: actions/checkout@v1
1112

1213
- name: Setup Node.js
1314
uses: actions/setup-node@v1
1415
with:
15-
node-version: 12.x
16+
node-version: 10.x
1617

1718
- name: Setup Expo
1819
uses: expo/expo-github-action@v5
@@ -22,32 +23,28 @@ jobs:
2223
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
2324
expo-cache: true
2425

25-
- name: Get yarn cache
26+
- name: Restore yarn cache
2627
id: yarn-cache
27-
run: echo "::set-output name=dir::$(yarn cache dir)"
28-
29-
- name: Check yarn cache
30-
uses: actions/cache@v1
28+
uses: actions/cache@master
3129
with:
32-
path: ${{ steps.yarn-cache.outputs.dir }}
33-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-yarn-
30+
path: '**/node_modules'
31+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
3632

3733
- name: Install dependencies
38-
run: yarn bootstrap
34+
if: steps.yarn-cache.outputs.cache-hit != 'true'
35+
run: yarn install --frozen-lockfile
3936

4037
- name: Publish Expo app
4138
working-directory: ./example
4239
run: expo publish --release-channel=pr-${{ github.event.number }}
4340

4441
- name: Get expo link
4542
id: expo
46-
run: echo "::set-output name=path::@satya164/react-native-tab-view-demos?release-channel=pr-${{ github.event.number }}"
43+
run: echo "::set-output name=path::@satya164/react-native-tab-view-demos?release-channel=pr-${{ github.event.number }}
4744

4845
- name: Comment on PR
4946
uses: unsplash/comment-on-pr@master
5047
env:
5148
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5249
with:
53-
msg: The Expo app for the example from this branch is ready!<br><br>[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})<br><br><a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>.
50+
msg: The Expo app for the example from this branch is ready!<br><br>[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})<br><br><a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>.

.github/workflows/expo.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,16 @@ jobs:
2525
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
2626
expo-cache: true
2727

28-
- name: Get yarn cache
28+
- name: Restore yarn cache
2929
id: yarn-cache
30-
run: echo "::set-output name=dir::$(yarn cache dir)"
31-
32-
- uses: actions/cache@v1
30+
uses: actions/cache@master
3331
with:
34-
path: ${{ steps.yarn-cache.outputs.dir }}
35-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
36-
restore-keys: |
37-
${{ runner.os }}-yarn-
32+
path: '**/node_modules'
33+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
3834

3935
- name: Install dependencies
40-
run: yarn bootstrap
36+
if: steps.yarn-cache.outputs.cache-hit != 'true'
37+
run: yarn install --frozen-lockfile
4138

4239
- name: Publish Expo app
4340
working-directory: ./example

.github/workflows/triage.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Triage
2+
on:
3+
issues:
4+
types: [labeled]
5+
6+
jobs:
7+
needs-more-info:
8+
runs-on: ubuntu-latest
9+
if: github.event.label.name == 'needs more info'
10+
steps:
11+
- uses: actions/checkout@master
12+
- uses: actions/[email protected]
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
args: comment "Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to [reproduce the issue with minimal code](https://stackoverflow.com/help/minimal-reproducible-example) (link to [snack.expo.io](https://snack.expo.io)) or a repo on GitHub, and the information about your environment (such as the platform of the device, exact versions of all the packages mentioned in the template etc.)."
17+
18+
needs-repro:
19+
runs-on: ubuntu-latest
20+
if: github.event.label.name == 'needs repro'
21+
steps:
22+
- uses: actions/checkout@master
23+
- uses: actions/[email protected]
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
args: comment "Hey! Thanks for opening the issue. Can you provide a [minimal repro](https://stackoverflow.com/help/minimal-reproducible-example) which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on [snack.expo.io](https://snack.expo.io). If it's not possible to repro it on [snack.expo.io](https://snack.expo.io), then you can also provide the repro in a GitHub repository."

.github/workflows/versions.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check versions
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
jobs:
7+
check-versions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: react-navigation/check-versions-action@master
11+
with:
12+
github-token: ${{ secrets.GITHUB_TOKEN }}
13+
packages: |
14+
react-native-tab-view
15+
react-native-gesture-handler
16+
react-native-reanimated

0 commit comments

Comments
 (0)