Skip to content

Commit

Permalink
Use re-usable GHA workflows instead of dispatch
Browse files Browse the repository at this point in the history
update name
  • Loading branch information
snf2ye committed Jul 25, 2023
1 parent 6c2deab commit 5132c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

notify-slack:
notify-slack-on-failure:
needs: [ build, unit-tests-and-sonarqube, source-clear ]
runs-on: ubuntu-latest

Expand All @@ -87,28 +87,12 @@ jobs:
text: 'Build failed :sadpanda:'
username: 'Java-PFB GitHub Action'

dispatch-tag:
tag:
needs: [ build, unit-tests-and-sonarqube, source-clear ]
runs-on: ubuntu-latest

uses: ./.github/workflows/tag.yml
if: success() && github.ref == 'refs/heads/main'

steps:
- name: Fire off tag action
uses: broadinstitute/workflow-dispatch@v1
with:
workflow: Tag
token: ${{ secrets.BROADBOT_TOKEN }}

publish-library:
needs: [ build, unit-tests-and-sonarqube, source-clear, dispatch-tag ]
runs-on: ubuntu-latest

needs: [ build, unit-tests-and-sonarqube, source-clear, tag ]
uses: ./.github/workflows/publish.yml
if: success() && github.ref == 'refs/heads/main'

steps:
- name: Fire off Publish Library Action
uses: broadinstitute/workflow-dispatch@v1
with:
workflow: Publish Library to Artifactory
token: ${{ secrets.BROADBOT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish Library to Artifactory
on: create
on: workflow_call

env:
SERVICE_NAME: ${{ github.event.repository.name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Tag
on: workflow_dispatch
on: workflow_call

jobs:
tag-job:
Expand Down

0 comments on commit 5132c23

Please sign in to comment.