Skip to content

Commit cd75584

Browse files
committed
refactor: use better expo cli variables prefix
The password is already being picked up in the Expo CLI itself, so it's better to keep the same structure. https://github.com/expo/expo-cli/blob/master/packages/expo-cli/src/accounts.js#L93
1 parent 3c76843 commit cd75584

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can also use [the base image](base) in other Docker-based environments.
1010

1111
Within this Expo CLI action, you have full access to the original [Expo CLI][link-expo-cli].
1212
That means you are able to perform any command like login, publish and build.
13-
Also, this action will authenticate automatically when both `EXPO_USERNAME` and `EXPO_PASSWORD` variables are defined.
13+
Also, this action will authenticate automatically when both `EXPO_CLI_USERNAME` and `EXPO_CLI_PASSWORD` variables are defined.
1414

1515
> You don't necessarily need this action to use Expo.
1616
> You can also add `expo-cli` as a dependency to your project and use the official [NPM action][link-actions-npm] for example.
@@ -26,12 +26,12 @@ This makes the Expo actions overall faster.
2626
### Used secrets
2727

2828
To authenticate with your Expo account, use the variables listed below.
29-
In the Expo action you can define `secrets = ["EXPO_USERNAME", "EXPO_PASSWORD"]` to have them available.
29+
In the Expo action you can define `secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]` to have them available.
3030

31-
variable | description
32-
--- | ---
33-
`EXPO_USERNAME` | The email address or username of your Expo account.
34-
`EXPO_PASSWORD` | The password of your Expo account.
31+
variable | description
32+
--- | ---
33+
`EXPO_CLI_USERNAME` | The email address or username of your Expo account.
34+
`EXPO_CLI_PASSWORD` | The password of your Expo account, [automatically picked up by the cli][link-expo-cli-password].
3535

3636
> Some Expo commands don't require authentication.
3737
> Simply omit the `secrets = [...]` if you don't need it.
@@ -66,7 +66,7 @@ action "Publish" {
6666
needs = "Install"
6767
uses = "byCedric/ci-expo@2.1.0"
6868
args = "publish"
69-
secrets = ["EXPO_USERNAME", "EXPO_PASSWORD"]
69+
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
7070
}
7171
```
7272

@@ -103,7 +103,7 @@ action "Publish" {
103103
needs = "Filter branch"
104104
uses = "byCedric/ci-expo@2.1.0"
105105
args = "publish"
106-
secrets = ["EXPO_USERNAME", "EXPO_PASSWORD"]
106+
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
107107
}
108108
```
109109

@@ -153,3 +153,4 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
153153
[link-actions-npm]: https://github.com/actions/npm
154154
[link-expo]: https://expo.io
155155
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
156+
[link-expo-cli-password]: https://github.com/expo/expo-cli/blob/8ea616d8848a123270b97e226e33dcb3dde49653/packages/expo-cli/src/accounts.js#L94

entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
if [ -n "$EXPO_USERNAME" ] && [ -n "$EXPO_PASSWORD" ]; then
6-
expo login --username $EXPO_USERNAME --password $EXPO_PASSWORD
5+
if [ -n "$EXPO_CLI_USERNAME" ] && [ -n "$EXPO_CLI_PASSWORD" ]; then
6+
expo login --username $EXPO_CLI_USERNAME
77
else
88
echo 'Skipping Expo login, username and/or password not defined...'
99
fi

0 commit comments

Comments
 (0)