diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-03-18 11:31:53 +0900 |
---|---|---|
committer | Darius Jahandarie <djahandarie@gmail.com> | 2023-03-18 11:31:53 +0900 |
commit | f46c4d08aaf4aa66b2b7ea311513d3a30bbe2211 (patch) | |
tree | 3e89c5476f1aa4fd20ef99904f3e4c694c403697 /.github/workflows/delay.yml | |
parent | e7a6f0354b8c38046e449566a371e366ef6b6889 (diff) |
Add forgotten delay workflow
Diffstat (limited to '.github/workflows/delay.yml')
-rw-r--r-- | .github/workflows/delay.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/.github/workflows/delay.yml b/.github/workflows/delay.yml new file mode 100644 index 00000000..45e38cbb --- /dev/null +++ b/.github/workflows/delay.yml @@ -0,0 +1,43 @@ +# This workflow is used to delay the execution of workflows that need to use an environment. +# The delay occurs thanks to the usage of the 12hoursDelay environment. +# +# It is used to delay the execution of the publish-chrome(-development) workflow to avoid the +# Google Web Store rejecting the upload of a new version because it is still in review. +# +# The reason we can't directly do a workflow-dispatch is because the 12hoursDelay +# environment does not include our secrets, so instead we chain two workflow-dispatch calls. + +name: delay +on: + workflow_dispatch: + inputs: + workflow: + description: "Workflow name" + required: true + attemptNumber: + description: "Attempt number" + required: false + default: "1" + maxAttempts: + description: "Max attempts" + required: false + default: "10" +permissions: + actions: write +jobs: + delay: + runs-on: ubuntu-latest + environment: 12hoursDelay + steps: + - name: Start the next attempt + uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 # pin@v2 + with: + workflow: ${{ github.event.inputs.workflow }} + token: ${{ secrets.GITHUB_TOKEN }} + wait-for-completion: false + inputs: | + { + "attemptNumber": "${{ github.event.inputs.attemptNumber }}", + "maxAttempts": "${{ github.event.inputs.maxAttempts }}", + "environment": "${{ github.event.inputs.environment }}" + } |