Skip to content

Commit

Permalink
Merge pull request #8 from i-dot-ai/EN-623/workflow_fixes
Browse files Browse the repository at this point in the history
Minor workflow fixes
  • Loading branch information
RyanWhite25 authored Oct 16, 2024
2 parents c33d64f + 4111ee0 commit e18442e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Publish
run-name: Publish ${{ inputs.tag }} to PyPI ${{ inputs.tag }}
run-name: Publish ${{ inputs.tag }} to PyPI

on:
workflow_call:
Expand Down Expand Up @@ -53,10 +53,10 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

determine-success:
if: inputs.stage == 'prod' && always()
needs:
- build-and-publish
runs-on: ubuntu-latest
if: always()
outputs:
success: ${{ steps.success.outputs.success }}
steps:
Expand All @@ -76,7 +76,7 @@ jobs:
- determine-success
with:
WORKFLOW_PASSED: ${{ needs.determine-success.outputs.success == 'true' }}
SUCCESS_PAYLOAD: "{\"blocks\":[{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\":airplane: ${{ github.repository }} - Successfully deployed ${{ inputs.tag }} :large_green_circle:\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Package published to PyPi successfully\"}}]}"
FAILURE_PAYLOAD: "{\"blocks\":[{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\":x: ${{ github.repository }} - Failed to deploy ${{ inputs.tag }} :x:\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Failed to publish package to PyPi\"}}]}"
SUCCESS_PAYLOAD: "{\"blocks\":[{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\":airplane: ${{ github.repository }} - Successfully deployed ${{ inputs.tag }} :large_green_circle:\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Package published to PyPI successfully\"}}]}"
FAILURE_PAYLOAD: "{\"blocks\":[{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\":x: ${{ github.repository }} - Failed to deploy ${{ inputs.tag }} :x:\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Failed to publish package to PyPI\"}}]}"
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
publish:
name: Publish
uses: i-dot-ai/cruft-iai/.github/workflows/publish.yml@main
uses: i-dot-ai/cruft-iai/.github/workflows/publish.yml@master
with:
stage: prod
tag: ${{ github.event.release.tag_name }}
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
bash scripts/test.sh --ci
test-publish:
if: github.event.ref_name == github.event.repository.default_branch
needs:
- test-code
uses: i-dot-ai/cruft-iai/.github/workflows/publish.yml@main
uses: i-dot-ai/cruft-iai/.github/workflows/publish.yml@master
with:
stage: test
tag: "0.0.0"

0 comments on commit e18442e

Please sign in to comment.