Skip to content
Closed
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
19 changes: 18 additions & 1 deletion .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,27 @@ on:
types: [opened, synchronize, reopened, ready_for_review, labeled]

jobs:
check:
name: Check for relevance
runs-on: ubuntu-latest
if: |
contains(github.event.pull_request.labels.*.name, 'Update dependencies') &&
(github.actor == 'dependabot[bot]' || github.actor == 'github-actions[bot]') &&
github.repository == 'github/codeql-action' &&
github.head.repo.full_name == 'github/codeql-action' &&
github.base.repo.full_name == 'github/codeql-action'
env:
ACTOR: '${{ github.actor }}'

steps:
- name: Check Actor
run: echo "This PR should run the Update Dependencies workflow because the actor is $ACTOR, there is no fork involved, and the 'Update dependencies' label exists."

update:
needs: check
environment: Update dependencies
name: Update dependencies
runs-on: macos-latest
if: contains(github.event.pull_request.labels.*.name, 'Update dependencies')
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down