Skip to content

Commit

Permalink
ci: require test job success before auto-merge & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Sep 5, 2024
1 parent 0fc19a2 commit 70dd3f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ on:
- opened

jobs:
tests:
if: ${{ github.actor == 'dependabot[bot]' && github.event.label.name == 'dependencies' }}
uses: ./.github/workflows/tests.yml
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event.label.name == 'dependencies' }}
needs: [tests]

steps:
- name: Dependabot metadata
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

env:
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}

jobs:
tests:
name: Release new Docker Image in GHCR
Expand All @@ -24,13 +21,6 @@ jobs:
with:
fetch-depth: 0

- name: Initialise gopass
uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
if: env.HAS_SECRETS == 'HAS_SECRETS'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Python unit tests
on:
push:
pull_request:

env:
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
workflow_call:

jobs:
tests:
Expand All @@ -23,13 +21,6 @@ jobs:
with:
fetch-depth: 0

- name: Initialise gopass
uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
if: env.HAS_SECRETS == 'HAS_SECRETS'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 70dd3f0

Please sign in to comment.