Skip to content

Commit

Permalink
refactor: expand existing login with documentation and proper icon
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Apr 2, 2019
1 parent 4545e44 commit d2e2a6d
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 5 deletions.
13 changes: 8 additions & 5 deletions login/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM bycedric/ci-expo
FROM bycedric/ci-expo:2

LABEL com.github.actions.name="Expo CLI Login"
LABEL com.github.actions.description="Use Expo CLI in your GitHub Actions workflow."
LABEL com.github.actions.icon="terminal"
LABEL com.github.actions.name="Login with Expo"
LABEL com.github.actions.description="Authenticate with Expo your GitHub Actions workflow."
LABEL com.github.actions.icon="log-in"
LABEL com.github.actions.color="gray-dark"

ENTRYPOINT expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
COPY LICENSE.md README.md /
COPY entrypoint.sh /entrypoint-login.sh

ENTRYPOINT ["/entrypoint-login.sh"]
21 changes: 21 additions & 0 deletions login/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) 2018 Cedric van Putten <[email protected]>

> 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.
31 changes: 31 additions & 0 deletions login/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Expo Login for GitHub Actions

Authenticate the current workflow to publish new versions or create new builds.
It works relatively simple, you define the Expo credentials and this action will do the rest.

## Usage

First you need to define the [secrets listed below][#secrets] through [GitHub secrets](https://developer.github.com/actions/managing-workflows/storing-secrets/).
After that, you can add the action below in your workflow.

```hcl
action "Login with Expo" {
uses = "bycedric/ci-expo/login@master"
secrets = ["EXPO_USERNAME", "EXPO_PASSWORD"]
}
```

### Secrets

* `EXPO_USERNAME` - **Required**. The email address or username of the Expo account.
* `EXPO_PASSWORD` - **Required**. The password of the Expo account.

## 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>
10 changes: 10 additions & 0 deletions login/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh -l

set -e

if [ -n "$EXPO_USERNAME" ] && [ -n "$EXPO_PASSWORD" ]; then
expo login --username $EXPO_USERNAME --password $EXPO_PASSWORD
else
echo "Please define both EXPO_USERNAME and EXPO_PASSWORD."
exit 1
fi

0 comments on commit d2e2a6d

Please sign in to comment.