From e2b0669e64a063fedefc077da51b4748faa0c774 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Tue, 3 Jan 2023 17:30:56 +0100 Subject: [PATCH 1/3] docs: update badge urls and header structure --- README.md | 59 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index d2aec97c..919631e4 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,35 @@

expo-github-action

Publish, build or manage your Expo app with GitHub Actions!

-

- - releases - - - builds - - - license - -

-

- Usage -   —   - Examples -   —   - Caveats -   —   - Changelog -

+

+ + + + Latest release + + + + + + Workflow status + + +

+ +

+ Usage +   —   + Examples +   —   + Caveats +   —   + Changelog +

+ +
+ ## What's inside? With this Expo action, you have full access to [Expo CLI][link-expo-cli] and [EAS CLI][link-eas-cli]. @@ -135,7 +142,7 @@ jobs: ### Publish a preview from PR -Reviewing pull requests can take some time. +Reviewing pull requests can take some time. The reviewer needs to check out the branch, install the changes, and run the bundler to review the results. You can also automatically publish the project for the reviewer to skip those manual steps. @@ -180,7 +187,7 @@ jobs: ### Automatic Expo login -Some Expo commands, like `expo publish` and `eas build`, require you to be authenticated. +Some Expo commands, like `expo publish` and `eas build`, require you to be authenticated. This action exports the [**token**][link-expo-token] to ensure you are authenticated in every workflow step. > Note, this action does not store the [token][link-expo-token] anywhere. Each separate workflow job needs to set up the [**token**][link-expo-token] individually. @@ -188,16 +195,16 @@ This action exports the [**token**][link-expo-token] to ensure you are authentic ### Using the built-in cache You can opt-out from caching the Expo and EAS CLI installations. -Under the hood, it uses the [`@actions/cache`][link-actions-cache-package] package to restore a previous install. +Under the hood, it uses the [`@actions/cache`][link-actions-cache-package] package to restore a previous install. It reduces the installation time because it only needs to download and extract a single tar file. > Note, using cache will count towards your [repo cache limit][link-actions-cache-limit]. Both the Expo and EAS CLI are stored in different caches. ### ENOSPC errors on Linux -Creating new bundles with Metro can be memory intensive. -In the past, some builds resulted in `ENOSPC` errors. -To prevent anyone from running into this, we make sure Ubuntu has sensible defaults in terms of file system availability. +Creating new bundles with Metro can be memory intensive. +In the past, some builds resulted in `ENOSPC` errors. +To prevent anyone from running into this, we make sure Ubuntu has sensible defaults in terms of file system availability. You can opt-out from patching the file system by setting **patch-watchers** to `false`.
From 79298b37251d6ed11ffb0578fea86d9d02f96f03 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Tue, 3 Jan 2023 17:33:19 +0100 Subject: [PATCH 2/3] docs(preview-comment): update badge urls and header structure --- preview-comment/README.md | 67 +++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/preview-comment/README.md b/preview-comment/README.md index 3bc32859..1ad3052f 100644 --- a/preview-comment/README.md +++ b/preview-comment/README.md @@ -1,30 +1,37 @@

expo-github-action/preview-comment

Add Expo preview comments to pull requests

-

- - releases - - - builds - - - license - -

-

- Usage -   —   - Outputs -   —   - Examples -   —   - Caveats -   —   - Changelog -

+

+ + + + Latest release + + + + + + Workflow status + + +

+ +

+ Usage +   —   + Outputs +   —   + Examples +   —   + Caveats +   —   + Changelog +

+ +
+ ## What's inside? This (sub)action allows you to comment on pull requests containing Expo QR codes. @@ -48,8 +55,8 @@ Here is a summary of all the input options you can use. ## Available outputs -There are a few variables available to generate the comment content. -Some of these variables are also exported as subaction output. +There are a few variables available to generate the comment content. +Some of these variables are also exported as subaction output. Here is a summary of these variables. | output name | template name | description | @@ -89,10 +96,10 @@ jobs: pull-requests: write # Allow comments on PRs steps: - name: 🏗 Setup repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: 🏗 Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x cache: yarn @@ -117,7 +124,7 @@ jobs: ### Sending preview comments elsewhere -You can also use this action to generate the comment without actually commenting. +You can also use this action to generate the comment without actually commenting. By disabling commenting with **comment** set to `false`, you can reuse this action with any workflow trigger and send it to any service accessible in GitHub Actions. > See [Available variables](#available-variables) for a list of all outputs. @@ -134,10 +141,10 @@ jobs: pull-requests: write # Allow comments on PRs steps: - name: 🏗 Setup repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: 🏗 Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x cache: yarn @@ -174,7 +181,7 @@ jobs: ### Preventing duplicate comments -When automating these preview comments, you have to be careful not to spam a pull request on every successful run. +When automating these preview comments, you have to be careful not to spam a pull request on every successful run. Every comment contains a generated **message-id** to identify previously made comments and update instead of creating a new comment. ### GitHub tokens From 4311b0356163e6f670bcfa7d7106ed8edd40d429 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Wed, 4 Jan 2023 15:50:05 +0100 Subject: [PATCH 3/3] docs(command): update readme to fix badge --- command/README.md | 67 +++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/command/README.md b/command/README.md index 775fd295..45769e80 100644 --- a/command/README.md +++ b/command/README.md @@ -1,39 +1,45 @@

expo-github-action/command

Run Expo CLI or EAS CLI command by a comment on the PR

-

- - releases - - - builds - - - license - -

-

- Usage -   —   - Examples -   —   - Caveats -   —   - Changelog -

-## Experimental +

+ + + + Latest release + + + + + + Workflow status + + +

-**_This sub action is experimental and might change without notice. Use it at your own risk_** +

+ Usage +   —   + Examples +   —   + Caveats +   —   + Changelog +

+ +
+ +> **Warning** +> This sub action is experimental and might change without notice. Use it at your own risk ## Configuration options This action is customizable through variables defined in the [`action.yml`](action.yml). Here is a summary of all the input options you can use. -| variable | default | description | -| -------------- | --------------------------- | ------------------------------------------------------------------------------------------------ | +| variable | default | description | +| ---------------- | -------------- | ------------------------------------------------------------------------- | | **github-token** | `github.token` | A GitHub token to use when commenting on PR ([read more](#github-tokens)) | ## Example workflows @@ -46,13 +52,12 @@ You can read more about this in the [GitHub Actions documentation][link-actions] This workflow listens to the `issue_comment` event and run the `eas build` command to start a build at Expo. ```yml -name: Expo Comment Bot on: issue_comment: types: [created, edited] -concurrency: +concurrency: # Limit the max concurrency to only 1 active action per pull - group: bot-${{ github.event.issue.number }} + group: expo-bot-${{ github.event.issue.number }} cancel-in-progress: true jobs: bot: @@ -64,23 +69,27 @@ jobs: pull-requests: write steps: - name: 🏗 Setup repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: # Checkout the repo on the pull ref: refs/pull/${{ github.event.issue.number }}/merge + - name: 🏗 Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x cache: yarn + - name: 🏗 Setup Expo uses: expo/expo-github-action@v7 with: eas-version: latest expo-version: latest token: ${{ secrets.EXPO_TOKEN }} + - name: 📦 Install dependencies run: yarn install + - name: 🤖 Run expo bot uses: expo/expo-github-action/command@v7 ```