Skip to content

Commit

Permalink
feat: github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Alw3ys committed Oct 28, 2023
1 parent 609ddb2 commit 20c96bc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,32 @@ Login into deployplex to start using the CLI:
dctl login
```

Alternatively you can use a deployplex token generated from the console and set it as an environment variable.
Alternatively you can use a deployplex token generated from the dashboard and set it as an environment variable.
```bash
export DEPLOYPLEX_TOKEN="you_deployplex_token"
```

## Usage

On the terminal
```bash
dctl --help
```

On Github Actions
```yaml
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup dctl CLI
uses: deployplex/[email protected]
with:
token: ${{ secrets.DEPLOYPLEX_TOKEN }}
# https://pypi.org/project/dctl/#history version. (Not required); Defaults to `latest` if not provided
cli-version: latest
```
## Learn more
The best place to get started is following our getting started guide on the [DeployPlex CLI Documentation](https://docs.deployplex.com/cli).
Expand Down
24 changes: 24 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Setup dctl"
description: 'Setup dctl (DeployPlex CLI) in your Github Actions workflow.'
author: DeployPlex

branding:
icon: 'box'
color: 'black'

inputs:
token:
description: 'Your DeployPlex token.'
required: false

runs:
using: "composite"
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python3 -m pip install dctl==0.0.11
shell: bash
- run: echo "DEPLOYPLEX_TOKEN=${{ inputs.token }}" >> $GITHUB_ENV
if: ${{ inputs.token }}
shell: bash
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dctl"
version = "0.0.10"
version = "0.0.11"
description = "Command Line Interface (CLI) for DeployPlex"
authors = ["Alvaro Molina <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 20c96bc

Please sign in to comment.