Skip to content

Commit

Permalink
CI: Only run publish workflow if previous jobs succeed (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn authored Mar 17, 2024
1 parent 3093eee commit 4ab8911
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches:
- main
branches: [main]
pull_request:
schedule:
- cron: '30 3 * * 2'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches:
- main
branches: [main]
pull_request:
schedule:
- cron: '30 3 * * 2'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
on:
workflow_run:
workflows: [backend, frontend]
types:
- completed
branches: [main]
types: [completed]

name: Publish

jobs:
docker_image:
name: Build Docker image
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Build Docker image
Expand Down

0 comments on commit 4ab8911

Please sign in to comment.