-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed3229e
commit e00c9d9
Showing
4 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:dubnium-alpine | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN npm install -g appcenter-cli \ | ||
&& apk update \ | ||
&& apk add git | ||
|
||
RUN chmod +x /app/entrypoint.sh | ||
|
||
ENTRYPOINT ["/app/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
# app-center-cli-action | ||
# App Center CLI Action | ||
|
||
Enable the user to run any App Center CLI command. | ||
|
||
## :rocket: Usage | ||
|
||
A workflow example to run the App Center CLI command doing a Code Push deployment: | ||
|
||
```yaml | ||
name: App Center CLI Example | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: yarn install | ||
|
||
- run: yarn run unit-tests | ||
|
||
app_center_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: vhsantos26/app-center-cli-action@v1 | ||
with: | ||
user_token: ${{ secrets.APP_CENTER_TOKEN }} | ||
command: appcenter codepush release-react -a Example/app-ios -d Staging | ||
``` | ||
## :gear: Inputs | ||
| Name | Description | Default | Required | | ||
| ---------- | ------------------------- | :-----: | :------: | | ||
| user_token | The user App Center token | | True | | ||
| command | The App Center command | | True | | ||
## :thought_balloon: Support | ||
If you find our work useful, but for some reason there is something missing, please raise a pull request to us review it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "App Center CLI Action" | ||
description: "Action responsible to enable the user to run any App Center command" | ||
inputs: | ||
command: | ||
description: "App Center Command" | ||
required: true | ||
user_token: | ||
description: "User token" | ||
required: true | ||
branding: | ||
icon: terminal | ||
color: red | ||
runs: | ||
using: "docker" | ||
image: "Dockerfile" | ||
args: | ||
- ${{ inputs.command }} | ||
- ${{ inputs.user_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
if [[ -z ${INPUT_USER_TOKEN} ]]; then | ||
echo "[ERROR] The user token must not be empty!" | ||
exit 1 | ||
fi | ||
|
||
${INPUT_COMMAND} --token "${INPUT_USER_TOKEN}" |