Add output variable tag_name to the action (#480)

* Add output variable `tag_name` to the action

* Simplify test steps on ci

* Set bash as default shell for windows runner

* Update README
This commit is contained in:
Robin Raju authored and GitHub committed 2022-07-06 13:46:57 +02:00
1 parent a618a6c6e3
commit a2560d77c5
6 files changed
+38 -10

No files matched your search

+15
View File
@@ -38,6 +38,7 @@ jobs:
- name: Run action
uses: ./
id: download-public
with:
repository: "robinraju/probable-potato"
tag: "1.0.1"
@@ -52,6 +53,7 @@ jobs:
- name: Test download from a private repo
uses: ./
id: download-private
with:
repository: "robinraju/release-downloader-test"
latest: true
@@ -64,3 +66,16 @@ jobs:
- name: List downloaded files from private repo
shell: bash
run: ls -lrth downloader-test
- name: Read output variable set by previous steps
shell: bash
run: |
if [ -n ${{steps.download-public.outputs.tag_name}} ]; then
echo ${{steps.download-public.outputs.tag_name}}
else echo "Unable to read output variable from step download-public"; exit 1
fi
if [ -n ${{steps.download-private.outputs.tag_name}} ]; then
echo ${{steps.download-private.outputs.tag_name}}
else echo "Unable to read output variable from step download-private"; exit 1
fi