Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo Preview Action Fails with pull_request Event #298

Open
IZUMI-Zu opened this issue Aug 1, 2024 · 0 comments
Open

Expo Preview Action Fails with pull_request Event #298

IZUMI-Zu opened this issue Aug 1, 2024 · 0 comments
Assignees

Comments

@IZUMI-Zu
Copy link

IZUMI-Zu commented Aug 1, 2024

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:

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.

@IZUMI-Zu IZUMI-Zu changed the title Expo Preview Action Fails with pull_request_target Event Expo Preview Action Fails with pull_request Event Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants