Skip to content

Commit

Permalink
Add flags
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Jun 27, 2022
1 parent e9e7aba commit 1fb3b01
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,51 @@ It is included by default with ZAP. However, it can also be used as the CLI. thi
### Github action
```yaml
- name: Zest CLI
uses: hahwul/zest-env@v1.0.0-action
uses: hahwul/zest-env@v1.1.0-action
with:
script: <YOUR-ZEST-SCRIPT>
flags: "-token 'id=secret' -token 'password=secret'"
```
*Flags*
- `-summary`
- `-list`
- `-debug`
- `-timeout`: timeout for requests in second
- `-prefix`: http://prefix
- `-token`: name=value
- `-http-auth-site`: site
- `-http-auth-realm`: realm
- `-http-auth-user`: user
- `-http-auth-password`: password
- `-insecure`: skip the SSL certificate check

### Dockerhub
#### In CLI
```
docker pull hahwul/zest-env
docker pull hahwul/zest-env:latest
docker pull hahwul/zest-env:v1.0.0
docker pull hahwul/zest-env:v1.1.0
```
![](https://user-images.githubusercontent.com/13212227/170864242-bebfa421-21cc-4f27-8077-230fdfe47202.png)
#### In Dockerfile
```dockerfile
FROM hahwul/zest-env:v1.0.0
FROM hahwul/zest-env:v1.1.0
# Add your Job
RUN /usr/bin/zest -script <FILENAME>
```

### Github Container Registry (GHCR)
#### In CLI
```
docker pull ghcr.io/hahwul/zest-env:v1.0.0
docker pull ghcr.io/hahwul/zest-env:v1.1.0
```
![](https://user-images.githubusercontent.com/13212227/170864338-f557b07c-9dc0-4500-84b4-13a86c5411da.png)

#### In Dockerfile
```dockerfile
FROM ghcr.io/hahwul/zest-env:v1.0.0
FROM ghcr.io/hahwul/zest-env:v1.1.0
# Add your Job
RUN /usr/bin/zest -script <FILENAME>
```
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ runs:
using: 'docker'
image: 'github-action/Dockerfile'
args:
- ${{ inputs.script }}
- ${{ inputs.script }}
- ${{ inputs.flags }}
2 changes: 1 addition & 1 deletion github-action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ghcr.io/hahwul/zest-env:v1.0.0
FROM ghcr.io/hahwul/zest-env:v1.1.0
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
9 changes: 8 additions & 1 deletion github-action/entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/sh -l

echo "$1" > /input.zst
out=$(/usr/bin/zest -script /input.zst)
args=""
if test -z "$2"
then
args=""
else
args=" $2"
fi
out=$(/usr/bin/zest -script /input.zst$args)
echo "::set-output name=output::$out"

0 comments on commit 1fb3b01

Please sign in to comment.