【发布时间】:2020-02-16 11:01:37
【问题描述】:
我可以通过${{ github.repository }} 获得repoowner/repo-name,但我喜欢只获得repo-name。
当我在做的时候。
GitLab 对此有一个直接的变量。
如何从不在脚本内部的.yaml 获取引用访问环境变量? ${{ $ENV_VAR }} 有效吗?应该不会吧。
有没有办法直接在 yaml 中删除或替换斜线?
build:
needs: test
name: Build release Zip
runs-on: ubuntu-latest
env:
DEPLOY_REF: ${{ github.sha }}
DEPLOY_REF_SHORT: ${{ github.sha }}
DEPLOY_ZIPFILE: ${{ github.workspace }}/build/zip/${{ github.repository }}-${{ github.sha }}.zip
steps:
【问题讨论】:
标签: github github-actions