【发布时间】:2021-07-02 09:02:53
【问题描述】:
我正在尝试使用date 一步保存变量名。但是,在后面的步骤中,它似乎是未定义的(或空的?)。我在这里错过了什么?
jobs:
# Create release branch for the week
branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format the date of next Tuesday
id: tuesday
run: echo "abbr=$(date -v+tuesday +'%y%m%d')" >> $GITHUB_ENV
- name: Create a branch with next tuesday's date
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: release/${{ steps.tuesday.outputs.abbr }}
错误:
refs/heads/release/ is not a valid ref name.
【问题讨论】:
-
如果你想从一个步骤输出一个值,它不应该看起来更像例如github.com/textbook/salary-stats/blob/…?这就是docs.github.com/en/free-pro-team@latest/actions/reference/… 中显示的内容,它对我有用。
标签: github-actions