From 24768d7eec6a2e302fe768811cc0674549613947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 9 Aug 2024 10:06:59 +0200 Subject: [PATCH] CI: distribution version: fix skip check for dependabot created branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According `github` context section of the GitHub workflow documentation[1] there are `github.ref` and `github.ref_name` with the difference being that the former is: > The ref given is fully-formed, meaning that for branches the format is > `refs/heads/`, > for pull requests it is `refs/pull//merge`, > and for tags it is refs/tags/. > For example, refs/heads/feature-branch-1. While the latter is: > The short ref name of the branch or tag that triggered the workflow run. > This value matches the branch or tag name shown on GitHub. > For example, feature-branch-1. > For pull requests, the format is /merge. The workflow file clearly assumes the latter format while using the former name, resulting in the check always being false. The check itself also use `GITHUB_REF_NAME` and not `GITHUB_REF`. [1]: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/contexts#github-context Fixes: 148e430 ("CI: distribution version: skip check for dependabot created branches") Signed-off-by: Leonard Göhrs --- .github/workflows/distribution-version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/distribution-version.yaml b/.github/workflows/distribution-version.yaml index 1204fc15..5b7474fe 100644 --- a/.github/workflows/distribution-version.yaml +++ b/.github/workflows/distribution-version.yaml @@ -8,7 +8,7 @@ jobs: check: name: consistency check runs-on: ubuntu-latest - if: github.repository == 'linux-automation/meta-lxatac' && !startsWith(github.ref, 'dependabot/') + if: github.repository == 'linux-automation/meta-lxatac' && !startsWith(github.ref_name, 'dependabot/') steps: - name: Install required packages run: |