Update CI to use concurrency

This commit is contained in:
Matthias 2022-06-06 10:57:33 +02:00
parent ea9b68badd
commit 82c5a6b29d

View File

@ -13,6 +13,10 @@ on:
schedule:
- cron: '0 5 * * 4'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_linux:
@ -296,17 +300,17 @@ jobs:
details: Freqtrade doc test failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
cleanup-prior-runs:
permissions:
actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it
contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch
runs-on: ubuntu-20.04
steps:
- name: Cleanup previous runs on this branch
uses: rokroskar/workflow-run-cleanup-action@v0.3.3
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/stable' && github.repository == 'freqtrade/freqtrade'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# cleanup-prior-runs:
# permissions:
# actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it
# contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch
# runs-on: ubuntu-20.04
# steps:
# - name: Cleanup previous runs on this branch
# uses: rokroskar/workflow-run-cleanup-action@v0.3.3
# if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/stable' && github.repository == 'freqtrade/freqtrade'"
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Notify only once - when CI completes (and after deploy) in case it's successfull
notify-complete: