mirror of
https://github.com/unraid/api.git
synced 2026-01-06 16:49:49 -06:00
fix: skip duplicate runs in github actions
This commit is contained in:
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@@ -3,14 +3,25 @@ name: CI - Main
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- $default-branch
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
start:
|
||||
if: |
|
||||
# This prevents a tag running twice as it'll have a "tag" and a "commit" event
|
||||
# Normal commit
|
||||
(github.event.base_ref === "refs/heads/$default-branch" && !startsWith(github.event.head_commit.message, 'chore(release)')) ||
|
||||
# Release tag
|
||||
(startsWith(github.event.base_ref, 'refs/tags/') && startsWith(github.event.head_commit.message, 'chore(release)'))
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [start]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v1
|
||||
@@ -43,6 +54,8 @@ jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [start]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v1
|
||||
|
||||
Reference in New Issue
Block a user