expo / expo/expo-github-action
Expo Preview Action Fails with pull_request Event
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
## Topic and Issue
When using the `expo/expo-github-action` with the preview command in GitHub Actions. This setup is necessary for securely handling sensitive tokens like `EXPO_TOKEN`, especially for external contributors. However:
- Using `pull_request` event instead results in external contributors not having access to `EXPO_TOKEN`, causing the error: "Skipped authentication: 'token' not provided."
My setup is basically the same as the example:
```yml
on: [pull_request]
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: 📦 Install dependencies
run: yarn install
- name: 🚀 Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto --branch pr-${{ github.event.number }}
```
## Motivation
We want to set up an action that automatically comments on pull requests with preview links when contributors open a PR. This would allow for quick review by maintainers.
Is there a better way to achieve our goal of automatically creating and commenting Expo previews on pull requests, while maintaining security for external contributions? We're open to alternative approaches or configurations that might solve this issue.
Contributor guide
Assessment
This issue has not been assessed yet.