Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow to execute only with dependabot based PRs #980

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/requirement-check.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down