Skip to content

Commit

Permalink
Add namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hatamiarash7 committed Dec 22, 2022
1 parent 5f01b8c commit 4930375
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ With this action you can update your deployment on ArvanCloud PaaS.
Following inputs can be used as `step.with` keys

| Name | Type | Default | Description |
| ----------- | ------ | ------- | ------------------------------------------------------------------------ |
| `auth` | String | | Your API token from [ArvanCloud](https://www.arvancloud.com/en/docs/api) |
| `app` | String | | Application's name in your PaaS project |
| `container` | String | | The container that you want to update its image |
| `image` | String | | Docker image like `org/image:tag` |
| `version` | String | `1.3.3` | Version of ArvanCloud CLI tool |
| Name | Type | Default | Description |
| ----------- | -------- | ------- | ----------------------------------------------------------------------------------- |
| `auth` | Required | | Your API token from [ArvanCloud](https://www.arvancloud.com/en/docs/api) |
| `namespace` | | | The target namespace ( PaaS project ). Will be the default project if not specified |
| `app` | Required | | Application's name in your PaaS project |
| `container` | Required | | The container that you want to update its image |
| `image` | Required | | Docker image like `org/image:tag` |
| `version` | | `1.3.3` | Version of ArvanCloud CLI tool |

### Authentication

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
auth:
description: "Your ArvanCloud API auth token"
required: true
namespace:
description: "The target namespace ( project )"
required: false
default: ""
app:
description: "The ArvanCloud app to deploy to"
required: true
Expand All @@ -30,3 +34,4 @@ runs:
- ${{ inputs.app }}
- ${{ inputs.container }}
- ${{ inputs.image }}
- ${{ inputs.namespace }}
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ AUTH="$2"
APP="$3"
CONTAINER="$4"
IMAGE="$5"
NS="$6"

echo " -----> Create directory"

Expand All @@ -72,4 +73,4 @@ echo " -----> Login"

echo " -----> Deploy"

/service/arvan paas set image deployment ${APP} ${CONTAINER}=${IMAGE}
/service/arvan paas ${NS} set image deployment ${APP} ${CONTAINER}=${IMAGE}

0 comments on commit 4930375

Please sign in to comment.