我正在构建github操作管道,我想在我的作业中添加一个类似于 the retry keyword works in gitlab ,如果出现故障,将再次运行完整步骤。github操作中是否有允许这样做的内容?
以下是我正在使用的一个示例工作:
jobs: env-check: runs-on: ubuntu-latest container: image: myimage steps: - uses: actions/checkout@v2 - name: env-check run: | echo "foobar"
GitHub Action语法中似乎没有重试,这就是为什么你会发现互补的GitHub Actions,比如:
示例:
uses: nick-fields/retry@v2 with: timeout_minutes: 10 max_attempts: 3 command: npm run some-typically-slow-script