mirror of
https://github.com/expo/expo-github-action.git
synced 2026-11-15 17:32:45 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55b9dc47a8 | ||
|
|
882d5f940b | ||
|
|
cd33736735 | ||
|
|
d1909bbd24 | ||
|
|
d9cb1dbb0e | ||
|
|
aff8989f53 | ||
|
|
698a1c68a5 | ||
|
|
4c25ef9693 | ||
|
|
aa752f2bde | ||
|
|
fa422416ae | ||
|
|
92beb0f493 |
No files matched your search
+28
-12
@@ -5,15 +5,31 @@ services:
|
||||
env:
|
||||
global:
|
||||
- DOCKER_IMAGE=bycedric/expo-cli
|
||||
- DOCKER_TAG=2
|
||||
script:
|
||||
- docker build base -t $DOCKER_IMAGE:$DOCKER_TAG
|
||||
- docker run -ti --rm $DOCKER_IMAGE:$DOCKER_TAG diagnostics
|
||||
before_deploy:
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
- docker tag $DOCKER_IMAGE:$DOCKER_TAG $DOCKER_IMAGE:latest
|
||||
deploy:
|
||||
provider: script
|
||||
script: docker push $DOCKER_IMAGE:$DOCKER_TAG && docker push $DOCKER_IMAGE:latest
|
||||
on:
|
||||
branch: master
|
||||
stages:
|
||||
- expo cli v3
|
||||
- expo cli v2
|
||||
jobs:
|
||||
include:
|
||||
- stage: expo cli v3
|
||||
script:
|
||||
- docker build base/3 -t $DOCKER_IMAGE:3
|
||||
- docker run -ti --rm $DOCKER_IMAGE:3 diagnostics
|
||||
before_deploy:
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
- docker tag $DOCKER_IMAGE:3 $DOCKER_IMAGE:latest
|
||||
deploy:
|
||||
provider: script
|
||||
script: docker push $DOCKER_IMAGE:3 && docker push $DOCKER_IMAGE:latest
|
||||
on:
|
||||
branch: master
|
||||
- stage: expo cli v2
|
||||
script:
|
||||
- docker build base/2 -t $DOCKER_IMAGE:2
|
||||
- docker run -ti --rm $DOCKER_IMAGE:2 diagnostics
|
||||
before_deploy:
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
deploy:
|
||||
provider: script
|
||||
script: docker push $DOCKER_IMAGE:2
|
||||
on:
|
||||
branch: master
|
||||
@@ -1,3 +1,35 @@
|
||||
## [3.0.0](https://github.com/expo/expo-github-action/compare/2.3.2...3.0.0) (2019-07-23)
|
||||
|
||||
## Code refactors
|
||||
|
||||
* run travis in parallel for expo cli v2 and v3 ([882d5f9](https://github.com/expo/expo-github-action/commit/882d5f9))
|
||||
* add latest expo-cli v3 but keep v2 images updated ([cd33736](https://github.com/expo/expo-github-action/commit/cd33736))
|
||||
|
||||
|
||||
## [2.3.2](https://github.com/expo/expo-github-action/compare/2.3.1...2.3.2) (2019-05-09)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* use yarn to install expo cli globally ([9fd3635](https://github.com/expo/expo-github-action/commit/9fd3635))
|
||||
|
||||
|
||||
## [2.3.1](https://github.com/expo/expo-github-action/compare/2.3.0...2.3.1) (2019-04-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* increase node memory limit to 4gb ([4c25ef9](https://github.com/expo/expo-github-action/commit/4c25ef9))
|
||||
|
||||
### Documentation changes
|
||||
|
||||
* add note about overwriting node options ([aa752f2](https://github.com/expo/expo-github-action/commit/aa752f2))
|
||||
* add extra link to base image in description ([fa42241](https://github.com/expo/expo-github-action/commit/fa42241))
|
||||
* rename build action to remove ambiguity with other examples ([92beb0f](https://github.com/expo/expo-github-action/commit/92beb0f))
|
||||
|
||||
### Other chores
|
||||
|
||||
* make travis build the action to double check the docker file ([698a1c6](https://github.com/expo/expo-github-action/commit/698a1c6))
|
||||
|
||||
|
||||
## [2.3.0](https://github.com/expo/expo-github-action/compare/2.2.0...2.3.0) (2019-04-14)
|
||||
|
||||
### New features
|
||||
|
||||
+6
-2
@@ -1,4 +1,4 @@
|
||||
FROM bycedric/expo-cli:2
|
||||
FROM bycedric/expo-cli:3
|
||||
|
||||
LABEL com.github.actions.name="Expo CLI"
|
||||
LABEL com.github.actions.description="Use any Expo CLI command in your GitHub Actions workflow."
|
||||
@@ -7,4 +7,8 @@ LABEL com.github.actions.color="gray-dark"
|
||||
|
||||
COPY entrypoint.sh LICENSE.md README.md /
|
||||
|
||||
entrypoint ["/entrypoint.sh"]
|
||||
# increase node's default memory limit to 4gb
|
||||
# see: https://github.com/expo/expo-github-action/#overwriting-node_options
|
||||
ENV NODE_OPTIONS="--max_old_space_size=4096"
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
Publish, build or manage your [Expo][link-expo] Project with GitHub Actions!
|
||||
This repository contains a prebuilt base image with GitHub Actions implementations.
|
||||
You can also use [the base image](base) in other Docker-based environments.
|
||||
You can also use [the base image][link-base] in other Docker-based environments.
|
||||
|
||||
## What's inside?
|
||||
|
||||
Within this Expo CLI action, you have full access to the original [Expo CLI][link-expo-cli].
|
||||
That means you are able to perform any command like login, publish and build.
|
||||
That means you can perform any command like login, publish and build.
|
||||
Also, this action will authenticate automatically when both `EXPO_CLI_USERNAME` and `EXPO_CLI_PASSWORD` variables are defined.
|
||||
|
||||
> You don't necessarily need this action to use Expo.
|
||||
@@ -18,9 +18,9 @@ Also, this action will authenticate automatically when both `EXPO_CLI_USERNAME`
|
||||
|
||||
### Why use a base-image?
|
||||
|
||||
Every GitHub action will start from scratch, using the dockerfile as the starting point.
|
||||
Every GitHub action will start from scratch using the dockerfile as the starting point.
|
||||
If you define `expo-cli` in this dockerfile, it will install it every time you run an action.
|
||||
By using a prebuilt image, it basically "skips" the process of downloading the full CLI over and over again.
|
||||
By using [a prebuilt image][link-base], it basically "skips" the process of downloading the full CLI over and over again.
|
||||
This makes the Expo actions overall faster.
|
||||
|
||||
### Used secrets
|
||||
@@ -36,6 +36,15 @@ variable | description
|
||||
> Some Expo commands don't require authentication.
|
||||
> Simply omit the `secrets = [...]` if you don't need it.
|
||||
|
||||
### Some caveats
|
||||
|
||||
#### Overwriting `NODE_OPTIONS`
|
||||
|
||||
By default, Node has a "limited" memory limit.
|
||||
To fully use the available memory in GitHub Actions, the `NODE_OPTIONS` variable is set to `--max_old_space_size=4096`.
|
||||
If you need to overwrite this variable, make sure you add this value too or risk Node running out of memory.
|
||||
See [issue #12][link-issue-memory] for more info.
|
||||
|
||||
## Example workflows
|
||||
|
||||
Before you dive into the workflow examples, you should know the basics of GitHub Actions.
|
||||
@@ -64,7 +73,7 @@ action "Install" {
|
||||
|
||||
action "Publish" {
|
||||
needs = "Install"
|
||||
uses = "expo/expo-github-action@2.3.0"
|
||||
uses = "expo/expo-github-action@3.0.0"
|
||||
args = "publish"
|
||||
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
|
||||
}
|
||||
@@ -101,7 +110,7 @@ action "Filter branch" {
|
||||
|
||||
action "Publish" {
|
||||
needs = "Filter branch"
|
||||
uses = "expo/expo-github-action@2.3.0"
|
||||
uses = "expo/expo-github-action@3.0.0"
|
||||
args = "publish"
|
||||
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
|
||||
}
|
||||
@@ -116,9 +125,9 @@ Instead of listening to push events, it's scheduled to run every day at 08:00.
|
||||
> That's why `secrets = [...]` is omitted here.
|
||||
|
||||
```hcl
|
||||
workflow "Install, Test and Build Web" {
|
||||
workflow "Install, Test and Build for Web" {
|
||||
on = "schedule(0 8 * * *)"
|
||||
resolves = ["Publish"]
|
||||
resolves = ["Build"]
|
||||
}
|
||||
|
||||
action "Install" {
|
||||
@@ -132,9 +141,9 @@ action "Test" {
|
||||
args = "test"
|
||||
}
|
||||
|
||||
action "Publish" {
|
||||
action "Build" {
|
||||
needs = "Test"
|
||||
uses = "expo/expo-github-action@2.3.0"
|
||||
uses = "expo/expo-github-action@3.0.0"
|
||||
args = "build:web"
|
||||
}
|
||||
```
|
||||
@@ -151,6 +160,8 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
|
||||
|
||||
[link-actions]: https://developer.github.com/actions/
|
||||
[link-actions-npm]: https://github.com/actions/npm
|
||||
[link-base]: base/3
|
||||
[link-expo]: https://expo.io
|
||||
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
|
||||
[link-expo-cli-password]: https://github.com/expo/expo-cli/blob/8ea616d8848a123270b97e226e33dcb3dde49653/packages/expo-cli/src/accounts.js#L94
|
||||
[link-issue-memory]: https://github.com/expo/expo-github-action/issues/12
|
||||
@@ -5,9 +5,8 @@ LABEL repository="https://github.com/expo/expo-github-action"
|
||||
LABEL homepage="https://github.com/expo/expo-github-action/blob/master/base"
|
||||
LABEL maintainer="Cedric van Putten <[email protected]>"
|
||||
|
||||
RUN npm install --global expo-cli@2 \
|
||||
&& npm cache rm --force \
|
||||
&& rm -rf ~/.npm
|
||||
RUN yarn global add expo-cli@2 \
|
||||
&& yarn cache clean
|
||||
|
||||
COPY entrypoint.sh LICENSE.md README.md /
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,43 @@
|
||||
# Expo for Docker
|
||||
|
||||
[](https://travis-ci.com/expo/expo-github-action)
|
||||
|
||||
A prebuilt docker image to use the [Expo CLI][link-expo-cli] on Docker-based environments.
|
||||
This image contains all necessary libraries to perform all commands of the CLI.
|
||||
To make sure this image stays up to date, Travis CI is scheduled to run weekly builds.
|
||||
|
||||
- Based on `node:10` image
|
||||
- Contains globally installed `expo-cli@2`
|
||||
|
||||
> This version is capped to `[email protected]` and `[email protected]`, which are outdated.
|
||||
> Please [upgrade to the latest version ASAP](../3).
|
||||
|
||||
## Usage
|
||||
|
||||
The entry point of this image forwards to the Expo CLI itself.
|
||||
With this entry point, you can provide any command directly to Docker.
|
||||
When nothing is provided, it will output the help information provided by the CLI.
|
||||
|
||||
> The entry point uses `sh -c` to invoke Expo, making environment variables available to that command.
|
||||
|
||||
```bash
|
||||
$ docker run --rm bycedric/expo-cli:2
|
||||
$ docker run --rm bycedric/expo-cli:2 pubish
|
||||
$ docker run --rm -ti bycedric/expo-cli:2 login
|
||||
$ docker run --rm -ti --entrypoint sh bycedric/expo-cli:2
|
||||
```
|
||||
|
||||
> This image is intended to use on Docker-based CI environments, see [the Expo CI guide][link-expo-cicd] to get started.
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
|
||||
|
||||
--- ---
|
||||
|
||||
<p align="center">
|
||||
with :heart: <a href="https://bycedric.com" target="_blank">byCedric</a>
|
||||
</p>
|
||||
|
||||
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
|
||||
[link-expo-cicd]: https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration
|
||||
File renamed without changes.
@@ -0,0 +1,13 @@
|
||||
FROM node:12
|
||||
|
||||
LABEL name="Expo for Docker"
|
||||
LABEL repository="https://github.com/expo/expo-github-action"
|
||||
LABEL homepage="https://github.com/expo/expo-github-action/blob/master/base"
|
||||
LABEL maintainer="Cedric van Putten <[email protected]>"
|
||||
|
||||
RUN yarn global add expo-cli@3 \
|
||||
&& yarn cache clean
|
||||
|
||||
COPY entrypoint.sh LICENSE.md README.md /
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -0,0 +1,22 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
|
||||
Copyright (c) 2019-present 650 Industries, Inc. (aka Expo)
|
||||
|
||||
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
> of this software and associated documentation files (the "Software"), to deal
|
||||
> in the Software without restriction, including without limitation the rights
|
||||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
> copies of the Software, and to permit persons to whom the Software is
|
||||
> furnished to do so, subject to the following conditions:
|
||||
>
|
||||
> The above copyright notice and this permission notice shall be included in
|
||||
> all copies or substantial portions of the Software.
|
||||
>
|
||||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
> THE SOFTWARE.
|
||||
@@ -0,0 +1,40 @@
|
||||
# Expo for Docker
|
||||
|
||||
[](https://travis-ci.com/expo/expo-github-action)
|
||||
|
||||
A prebuilt docker image to use the [Expo CLI][link-expo-cli] on Docker-based environments.
|
||||
This image contains all necessary libraries to perform all commands of the CLI.
|
||||
To make sure this image stays up to date, Travis CI is scheduled to run weekly builds.
|
||||
|
||||
- Based on `node:12` image
|
||||
- Contains globally installed `expo-cli@3`
|
||||
|
||||
## Usage
|
||||
|
||||
The entry point of this image forwards to the Expo CLI itself.
|
||||
With this entry point, you can provide any command directly to Docker.
|
||||
When nothing is provided, it will output the help information provided by the CLI.
|
||||
|
||||
> The entry point uses `sh -c` to invoke Expo, making environment variables available to that command.
|
||||
|
||||
```bash
|
||||
$ docker run --rm bycedric/expo-cli
|
||||
$ docker run --rm bycedric/expo-cli pubish
|
||||
$ docker run --rm -ti bycedric/expo-cli login
|
||||
$ docker run --rm -ti --entrypoint sh bycedric/expo-cli
|
||||
```
|
||||
|
||||
> This image is intended to use on Docker-based CI environments, see [the Expo CI guide][link-expo-cicd] to get started.
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
|
||||
|
||||
--- ---
|
||||
|
||||
<p align="center">
|
||||
with :heart: <a href="https://bycedric.com" target="_blank">byCedric</a>
|
||||
</p>
|
||||
|
||||
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
|
||||
[link-expo-cicd]: https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
set -e
|
||||
sh -c "expo $*"
|
||||
+2
-30
@@ -6,35 +6,7 @@ A prebuilt docker image to use the [Expo CLI][link-expo-cli] on Docker-based env
|
||||
This image contains all necessary libraries to perform all commands of the CLI.
|
||||
To make sure this image stays up to date, Travis CI is scheduled to run weekly builds.
|
||||
|
||||
- Based on `node:10` image
|
||||
- Contains globally installed `expo-cli@2`
|
||||
|
||||
## Usage
|
||||
|
||||
The entry point of this image forwards to the Expo CLI itself.
|
||||
With this entry point, you can provide any command directly to Docker.
|
||||
When nothing is provided, it will output the help information provided by the CLI.
|
||||
|
||||
> The entry point uses `sh -c` to invoke Expo, making environment variables available to that command.
|
||||
|
||||
```bash
|
||||
$ docker run --rm bycedric/expo-cli
|
||||
$ docker run --rm bycedric/expo-cli pubish
|
||||
$ docker run --rm -ti bycedric/expo-cli login
|
||||
$ docker run --rm -ti --entrypoint sh bycedric/expo-cli
|
||||
```
|
||||
|
||||
> This image is intended to use on Docker-based CI environments, see [the Expo CI guide][link-expo-cicd] to get started.
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
|
||||
|
||||
--- ---
|
||||
|
||||
<p align="center">
|
||||
with :heart: <a href="https://bycedric.com" target="_blank">byCedric</a>
|
||||
</p>
|
||||
- [Expo CLI v3](3)
|
||||
- [Expo CLI v2](2) _outdated_
|
||||
|
||||
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
|
||||
[link-expo-cicd]: https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration
|
||||
Reference in new issue
Block a user