Fix gha smells

- Avoid executing  scheduled workflows on forks
- Stop running workflows when there is a newer commit in PR
- Stop running workflows when there is a newer commit in branch
This commit is contained in:
Cedric Willekens 2024-04-18 21:18:23 +02:00
parent 06e7e0ce36
commit edba9285a6
2 changed files with 6 additions and 0 deletions

View File

@ -33,11 +33,16 @@ on:
- '!src/Jackett.Test/**'
schedule:
- cron: '00 00 * * 5'
concurrency:
group: ${{github.workflow}} - ${{github.ref}}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
runs-on: windows-2022
if: ${{github.repository == 'jackett/jackett'}}
permissions:
actions: read
contents: read

View File

@ -16,6 +16,7 @@ jobs:
redeliver-failed-deliveries:
name: Redeliver failed deliveries
runs-on: ubuntu-latest
if: ${{github.repository == 'jackett/jackett'}}
steps:
# This workflow will run a script that is stored in the repository. This step checks out the repository contents so that the workflow can access the script.
- name: Check out repo content