Skip to content

Commit

Permalink
Fix release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa-aadlv committed Dec 12, 2024
1 parent 437dd05 commit a35e2ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

# - name: Check version format
# run: |
# version="$INPUT_VERSION"

# # Check if version is in format number.number.number.dev
# if ! [[ $version =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?\.dev[0-9]+$ ]]; then
# echo "Invalid version format. It should be in format 'number.number.number.dev'."
# exit 1
# fi
# env:
# INPUT_VERSION: ${{ github.event.inputs.version }}
fetch-depth: 0

- name: Check-out base branch
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
define-release-version:
name: Release Artifacts Docker
name: Define Release Version
runs-on: ubuntu-24.04

outputs:
Expand Down Expand Up @@ -121,13 +121,13 @@ jobs:
release-artifact-slack-notifications:
name: Release Analytics Artifact Slack Notifications
runs-on: ubuntu-24.04
needs: [define-release-version, release-artifacts-docker, release-artifacts-pypi]
needs: [define-release-version, release-artifacts-docker, release-artifacts-pypi, release-atifacts-publish-release]

if: always() # Ensures this job runs regardless of the result of previous jobs

steps:
- name: Notify Slack of successful release 💬
if: ${{ needs.build_docker_image.result == 'success' && needs.deploy.result == 'success' }}
if: ${{ needs.release-artifacts-docker.result == 'success' && needs.release-artifacts-pypi.result == 'success' }}
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 #v 1.25.0
with:
# Send notification to #release slack channel
Expand All @@ -137,11 +137,11 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Notify Slack of unsuccessful release ⛔️
if: ${{ needs.build_docker_image.result != 'success' || needs.deploy.result != 'success' }}
if: ${{ needs.release-artifacts-docker.result == 'success' && needs.release-artifacts-pypi.result == 'success' }}
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 #v 1.25.0
with:
# Send notification to #devtribe slack channel
channel-id: "C061J0LGHU0"
slack-message: ":broken_heart: *Rasa SDK* release version `${{ needs.define-release-version.outputs.version }}` has failed! More information can be found <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>."
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit a35e2ff

Please sign in to comment.