Skip to content
Merged
Changes from 5 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
42 changes: 15 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,14 @@ jobs:
gh release upload $TAG $f
done
echo "Charts successfully uploaded to GitHub release $TAG"

dispatch-dependency:
dispatch-chart-release:
permissions:
contents: read
id-token: write
actions: write
runs-on: ubuntu-latest
timeout-minutes: 10
needs: publish-images
needs: release
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
- name: Read App Secrets
Expand All @@ -131,29 +130,18 @@ jobs:
private-key: ${{ env.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Run dispatch
- name: Dispatch to rancher/charts
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
case ${{ github.ref_name }} in
"v1.12"*)
ACTION_TARGET_BRANCH="main"
;;
"v1.11"*)
ACTION_TARGET_BRANCH="release/v2.11"
;;
"v1.10"*)
ACTION_TARGET_BRANCH="release/v2.10"
;;
"v1.9"*)
ACTION_TARGET_BRANCH="release/v2.9"
;;
"v1.3"*)
ACTION_TARGET_BRANCH="release/v2.8"
;;
*)
echo "Not a valid tag, not dispatching event"
exit 0
esac
echo "Running Go get on $ACTION_TARGET_BRANCH"
gh workflow run "Go get" --repo rancher/rancher --ref $ACTION_TARGET_BRANCH -F goget_module=github.com/rancher/aks-operator -F goget_version=${{ github.ref_name }} -F source_author=${{ github.actor }}
CURRENT_BRANCH="${{ github.ref_name }}"
BASE_VERSION=$(echo "$CURRENT_BRANCH" | sed -E 's/^[^v]*(v[0-9]+\.[0-9]+).*/\1/')
TRANSFORMED_VERSION="${BASE_VERSION/v1./v2.}"
TARGET_BRANCH="dev-${TRANSFORMED_VERSION}"
VERSION_OVERRIDE="minor"
gh workflow run "Manual Trigger for Auto Bump" \
--repo rancher/charts \
--ref "$TARGET_BRANCH" \
-F chart=rancher-aks-operator \
-F branch="$TARGET_BRANCH" \
-F version-override=$VERSION_OVERRIDE