相关疑难解决方法(0)

在 GitHub Actions 中保存 GITHUB_ENV 变量

我正在尝试使用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 }}
Run Code Online (Sandbox Code Playgroud)

错误:

refs/heads/release/ is not a valid ref name.
Run Code Online (Sandbox Code Playgroud)

github-actions

5
推荐指数
1
解决办法
8142
查看次数

标签 统计

github-actions ×1