Skip to content

Commit

Permalink
Update workflows: Invoke tests from deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpadhye committed Aug 18, 2024
1 parent c0659c0 commit db7ccd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/azure-deploy-f24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@
name: Build and deploy Node.js app to Azure Web App - nodebb-f24

on:
workflow_run:
workflows: [Lint and test]
branches: [f24]
types:
- completed
push:
branches:
- f24
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
lint-and-test:
uses:
.github/workflows/test.yaml

build-and-deploy:
# Run only on the CMU-313 repo, and either if manually deployed via UI or if the Lint & Test succeeded
if: github.repository == 'cmu-313/NodeBB' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
if: github.repository == 'cmu-313/NodeBB'
needs: lint-and-test

runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Lint and test

on:
push:
branches:
- f24
pull_request:
branches:
- f24
workflow_call: # Usually called from deploy

defaults:
run:
Expand Down

0 comments on commit db7ccd3

Please sign in to comment.