Skip to content

Commit

Permalink
Fix a dependency on a non existing job
Browse files Browse the repository at this point in the history
When you configured your plugin template to not check commit messages,
there's no way you can depend on that job.

[noissue]
mdellweg authored and lubosmj committed Dec 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 466c79b commit 10d0cf6
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions templates/github/.github/workflows/build.yml.j2
Original file line number Diff line number Diff line change
@@ -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) }}
5 changes: 5 additions & 0 deletions templates/github/.github/workflows/ci.yml.j2
Original file line number Diff line number Diff line change
@@ -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()"
3 changes: 0 additions & 3 deletions templates/github/.github/workflows/lint.yml.j2
Original file line number Diff line number Diff line change
@@ -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) }}

0 comments on commit 10d0cf6

Please sign in to comment.