-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (42 loc) · 1.36 KB
/
auto-updater.yml
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
name: Auto Updater
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
daily-auto-update:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.repository == 'react-native-community/reproducer-react-native'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Check React Native Version
id: yarnoutdated
working-directory: ReproducerApp
run: yarn outdated react-native
continue-on-error: true
- name: Re-create the reproducer
id: recreate
if: steps.yarnoutdated.outcome == 'failure'
run: |
rm -rf ReproducerApp
npx @react-native-community/cli@latest init ReproducerApp --skip-install --skip-git-init
cd ReproducerApp
yarn config set -H enableImmutableInstalls false
yarn
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add --all
git commit -m "Update reproducer to latest React Native version"
- name: Push changes
uses: ad-m/github-push-action@master
if: steps.yarnoutdated.outcome == 'failure'
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}