fix(CI): retry-test action can't use env in if
(#58838)
This commit is contained in:
parent
0cb1c40400
commit
f6babb4273
1 changed files with 2 additions and 3 deletions
5
.github/workflows/retry_test.yml
vendored
5
.github/workflows/retry_test.yml
vendored
|
@ -8,7 +8,6 @@ on:
|
||||||
- completed
|
- completed
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MAX_RETRIES: 3
|
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_CANARY_SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_CANARY_SLACK_WEBHOOK_URL }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -17,7 +16,7 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
retry-on-failure:
|
retry-on-failure:
|
||||||
name: retry failed jobs
|
name: retry failed jobs
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < fromJSON(env.MAX_RETRIES) }}
|
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: send retry request to GitHub API
|
- name: send retry request to GitHub API
|
||||||
|
@ -32,7 +31,7 @@ jobs:
|
||||||
|
|
||||||
report-failure:
|
report-failure:
|
||||||
name: report failure to slack
|
name: report failure to slack
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= fromJSON(env.MAX_RETRIES) }}
|
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= 3 }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: send webhook
|
- name: send webhook
|
||||||
|
|
Loading…
Reference in a new issue