Skip to content

Commit b2e49c3

Browse files
support git actions input env var (#16)
Co-authored-by: saffi <[email protected]>
1 parent 6627410 commit b2e49c3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

action.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: 'csdp-report-image'
22
description: 'Report image to csdp'
33
inputs:
4+
VERSION:
5+
description: specify client version
6+
required: false
7+
default: 0.0.21
48
CF_IMAGE:
59
description: image reported, quay.io/codefresh/newly-built-image:0.0.1
610
required: true
@@ -57,6 +61,4 @@ runs:
5761
steps:
5862
- shell: bash
5963
run: |
60-
VER=$(cat service.yaml | grep version | cut -d ':' -f 2 | tr -d ' ')
61-
env>cf_env
62-
docker run --env-file=cf_env quay.io/codefresh/csdp-report-image:$VER
64+
docker run --env-file=cf_env quay.io/codefresh/csdp-report-image:$INPUT_VERSION

service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name: csdp-report-image
2-
version: 0.0.20
2+
version: 0.0.21

0 commit comments

Comments
 (0)