Last active
November 22, 2020 16:07
-
-
Save jokester/8473868f69cc3d3d4029e7b3beec5bd5 to your computer and use it in GitHub Desktop.
Tricks for github action workflows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# poc of string interpolation in bash / github action | |
- name: print env variables to job output | |
run: for v in `cat env` ; do echo "::set-env name=${v%%=*}::${v##*=}" ; done | |
- name: use (maybe ) in shell command | |
run: docker push myrepo/myapp:${TAG_REF#refs/tags/} | |
env: | |
TAG_REF: ${{ github.ref }} | |
# references: | |
# - shell string interpolation https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html | |
# - action workflow syntax: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# - action expression/function syntax: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment