Skip to content
Merged
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
52 changes: 52 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,55 @@ jobs:
gh release upload $TAG $f
done
echo "Charts successfully uploaded to GitHub release $TAG"

dispatch-dependency:
permissions:
contents: read
id-token: write
actions: write
runs-on: ubuntu-latest
timeout-minutes: 10
needs: publish-images
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
- name: Read App Secrets
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials appId | APP_ID ;
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials privateKey | PRIVATE_KEY

- name: Create App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Run dispatch
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 }}
Loading