Skip to content

Commit

Permalink
chore: run if not dependabot or if the dependabot check passed and ha…
Browse files Browse the repository at this point in the history
…s been triggered by workflow_run
  • Loading branch information
leggetter committed Dec 19, 2024
1 parent b9b6098 commit c726679
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### .github/workflows/dependabot_pr.yml
### This workflow doesn't have access to secrets and has a read-only token
name: Dependabot PR Check
on:
pull_request

jobs:
check-dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- run: echo "PR created by Dependabot"
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: test

on:
pull_request_target:
types:
- opened
workflow_run:
workflows: ["Dependabot PR Check"]
types:
- completed
pull_request:
branches:
- main

Expand All @@ -29,6 +31,7 @@ jobs:

build-linux:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' || github.event.workflow_run.conclusion == 'success' }}
env:
# https://goreleaser.com/customization/docker_manifest/
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand Down

0 comments on commit c726679

Please sign in to comment.