Skip to content

Commit

Permalink
Fix GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TenType committed Jun 19, 2024
1 parent 48b3ae2 commit 832cde9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 40 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
name: preview
on: [pull_request, workflow_dispatch]
on:
# This workflow should only be run on trusted pull requests
pull_request_target:
types: [opened, synchronize]

jobs:
update:
name: EAS Update
if: |
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'COLLABORATOR'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Set up EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Set up EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto
- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto
7 changes: 4 additions & 3 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: style
on:
pull_request:
branches: [main]
branches:
- main
push:
branches: [main]
workflow_dispatch:
branches:
- main

jobs:
style:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: update
on:
push:
branches: [main]
workflow_dispatch:
branches:
- main

jobs:
update:
name: EAS Update
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Set up EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Set up EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Publish update
run: eas update --auto
- name: Publish update
run: eas update --auto

0 comments on commit 832cde9

Please sign in to comment.