Compare commits

...
6 Commits
4 changed files with 42 additions and 9 deletions

No files matched your search

+2
View File
@@ -9,6 +9,8 @@ env:
script:
- docker build base -t $DOCKER_IMAGE:$DOCKER_TAG
- docker run -ti --rm $DOCKER_IMAGE:$DOCKER_TAG diagnostics
- docker build . -t expo/expo-github-action
- docker run -ti --rm expo/expo-github-action diagnostics
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag $DOCKER_IMAGE:$DOCKER_TAG $DOCKER_IMAGE:latest
+17
View File
@@ -1,3 +1,20 @@
## [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
+4
View File
@@ -7,4 +7,8 @@ LABEL com.github.actions.color="gray-dark"
COPY entrypoint.sh LICENSE.md README.md /
# 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"]
+19 -9
View File
@@ -9,7 +9,7 @@ You can also use [the base image](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](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/[email protected].0"
uses = "expo/[email protected].1"
args = "publish"
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
}
@@ -101,7 +110,7 @@ action "Filter branch" {
action "Publish" {
needs = "Filter branch"
uses = "expo/[email protected].0"
uses = "expo/[email protected].1"
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/[email protected].0"
uses = "expo/[email protected].1"
args = "build:web"
}
```
@@ -154,3 +163,4 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
[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