diff --git a/templates/github/.github/workflows/build.yml.j2 b/templates/github/.github/workflows/build.yml.j2 index 421de339..ee14abed 100644 --- a/templates/github/.github/workflows/build.yml.j2 +++ b/templates/github/.github/workflows/build.yml.j2 @@ -16,9 +16,6 @@ defaults: jobs: build: runs-on: "ubuntu-latest" - {%- if pre_job_template %} - needs: "{{ pre_job_template.name }}" - {%- endif %} steps: {{ checkout(path=plugin_name) | indent(6) }} diff --git a/templates/github/.github/workflows/ci.yml.j2 b/templates/github/.github/workflows/ci.yml.j2 index 6ebc810a..e5a44af6 100644 --- a/templates/github/.github/workflows/ci.yml.j2 +++ b/templates/github/.github/workflows/ci.yml.j2 @@ -44,6 +44,9 @@ jobs: {%- endif %} lint: + {%- if pre_job_template %} + needs: {{ pre_job_template.name }} + {%- endif %} uses: "./.github/workflows/lint.yml" build: @@ -79,7 +82,9 @@ jobs: # This is a dummy dependent task to have a single entry for the branch protection rules. runs-on: "ubuntu-latest" needs: + {%- if check_commit_message or lint_requirements %} - "check-commits" + {%- endif %} - "lint" - "test" if: "always()" diff --git a/templates/github/.github/workflows/lint.yml.j2 b/templates/github/.github/workflows/lint.yml.j2 index 6069aeb7..6b0ab75e 100644 --- a/templates/github/.github/workflows/lint.yml.j2 +++ b/templates/github/.github/workflows/lint.yml.j2 @@ -16,9 +16,6 @@ defaults: jobs: lint: runs-on: ubuntu-latest - {%- if pre_job_template %} - needs: {{ pre_job_template.name }} - {%- endif %} steps: {{ checkout(path=plugin_name) | indent(6) }}