From 80ee7f299dfa644ba09ae61b2ec7ad598082d672 Mon Sep 17 00:00:00 2001 From: Odilon Sousa Date: Mon, 6 May 2024 13:35:43 -0300 Subject: [PATCH] Update workflow to execute only with dependabot based PRs --- .github/workflows/requirement-check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/requirement-check.yml b/.github/workflows/requirement-check.yml index 474fe87fa..4a9ffeabf 100644 --- a/.github/workflows/requirement-check.yml +++ b/.github/workflows/requirement-check.yml @@ -1,9 +1,9 @@ name: Check Requirements Update on: - label: - types: - - dependabot + pull_request: + paths: + - 'automation/requirements.txt' env: GIT_AUTHOR_NAME: Foreman Packaging Automation @@ -15,7 +15,7 @@ jobs: rpm_list: name: 'Check Package to Update' runs-on: ubuntu-latest - if: github.repository_owner == 'theforeman' + if: contains(github.event.pull_request.labels.*.name, 'dependabot') steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -30,7 +30,7 @@ jobs: printf '#!/bin/bash\necho "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"' | sudo tee /usr/local/bin/rpmdev-packager sudo chmod +x /usr/local/bin/* - name: Sort Updated Libs - run: git diff --unified=0 origin/rpm/develop..origin/${GITHUB_HEAD_REF} automation/requirements.txt | grep -Po '(?<=^\+)(?!\+\+).*' > $PACKAGE_TO_UPDATE + run: git diff --unified=0 origin/rpm/develop..pull/${GITHUB_REF_NAME} automation/requirements.txt | grep -Po '(?<=^\+)(?!\+\+).*' > $PACKAGE_TO_UPDATE - name: Check if package can be updated run: | set +e