Skip to content

Commit

Permalink
Update mirroring workflow
Browse files Browse the repository at this point in the history
Prevent CI and RuboCop from being run twice
  • Loading branch information
gbp committed Jul 14, 2023
1 parent 079d872 commit df61418
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [master, develop]
pull_request:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
name: Mirror to git.mysociety.org

on:
push:
workflow_run:
workflows: [CI, RuboCop]
types:
- completed

jobs:

ci:
uses: ./.github/workflows/ci.yml

rubocop:
uses: ./.github/workflows/rubocop.yml

mirror:
needs: [ci, rubocop]
runs-on: ubuntu-latest
steps:

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: RuboCop

on: [pull_request, workflow_call]
on:
pull_request:

permissions:
contents: read
Expand Down

0 comments on commit df61418

Please sign in to comment.