Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INFRA-1152] Fix release workflows #1179

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}