Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Show channel messages button on profile screen even if empty #4194

Show channel messages button on profile screen even if empty

Show channel messages button on profile screen even if empty #4194

Workflow file for this run

name: Expo Preview
defaults:
run:
working-directory: apps/expo
on:
pull_request:
paths:
- "package.json"
- "apps/expo/package.json"
- "apps/expo/app.config.js"
- "apps/expo/.env.*"
- "**/*.js"
- "**/*.jsx"
- "**/*.ts"
- "**/*.tsx"
- ".github/workflows/**"
- "**.patch"
- "**.lock"
concurrency:
group: preview-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pr-preview:
name: PR Preview
runs-on: ubuntu-latest
steps:
- name: Set up repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 16.x
- uses: 8BitJonny/[email protected]
id: PR
name: Check if we're in a PR
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.event.pull_request.head.sha }}
filterOutClosed: true
- name: Find yarn cache
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Set up Expo
uses: expo/expo-github-action@v7
with:
eas-version: latest
eas-cache: true
expo-cache: true
expo-version: 4.x
token: ${{ secrets.EXPO_TOKEN }}
- name: EAS Update
if: success() && steps.PR.outputs.number != ''
run: NODE_OPTIONS=--max-old-space-size=5120 EXPO_DEBUG=true STAGE=staging eas update --branch pr-${{ steps.PR.outputs.number }} --message "Deploy to PR preview"
- name: Preview Deep Link
id: publish-url
run: echo "::set-output name=url::exp+io.showtime.development://expo-development-client/?url=https://u.expo.dev/45cbf5d5-24fe-4aa6-9580-acf540651abd&channel-name=pr-${{ steps.PR.outputs.number }}"
- name: Find PR Comment
uses: peter-evans/find-comment@v1
if: success() && steps.PR.outputs.number != ''
id: existing-comment
with:
issue-number: ${{ steps.PR.outputs.number }}
body-includes: PR Preview - App
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v1
if: success() && steps.PR.outputs.number != ''
with:
comment-id: ${{ steps.existing-comment.outputs.comment-id }}
issue-number: ${{ steps.PR.outputs.number }}
edit-mode: replace
body: |
## PR Preview - App
This pull request preview deployment is now available.
<details>
<summary>Open Details</summary>
✅ Preview: <a href="${{ steps.publish-url.outputs.url }}">${{ steps.publish-url.outputs.url }}</a>
<a href="${{ steps.publish-url.outputs.url }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=512x512&data=${{ steps.publish-url.outputs.url }}" height="256px" width="256px" /></a>
Comment ID: ${{ steps.existing-comment.outputs.comment-id }}
</details>