Skip to content

Commit

Permalink
[release-1.30] Add Release downstream components in release workflow (#…
Browse files Browse the repository at this point in the history
…7600)

* Add Release downstream components in release workflow

* Remove dispatch
  • Loading branch information
rafaelbreno authored Jan 15, 2025
1 parent b962e98 commit 132b55d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
54 changes: 37 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,48 @@ jobs:
prime-username: ${{ env.PRIME_REGISTRY_USERNAME }}
prime-password: ${{ env.PRIME_REGISTRY_PASSWORD }}

dispatch:
release-downstream-components:
name: "Release downstream components"
needs: [release-amd64, release-arm64]
runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }},image=ubuntu22-full-x64,hdd=64
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Dapper
run: |
curl -sL https://releases.rancher.com/dapper/latest/dapper-$(uname -s)-$(uname -m) > /usr/local/bin/dapper
chmod +x /usr/local/bin/dapper
- name: "Read secrets"
- name: "Read Secrets"
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/pat-username/credentials token | PAT_USERNAME ;
secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APP_ID ;
secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | PRIVATE_KEY
- name: Generate GitHub App token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
owner: rancher
repositories: |
rke2-upgrade
system-agent-installer-rke2
- name: Dispatch
- name: Create release in `rancher/rke2-upgrade`
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
dapper -f Dockerfile --target dapper make dispatch
gh release create "$GITHUB_ACTION_TAG" \
--repo rancher/rke2-upgrade \
--title "$GITHUB_ACTION_TAG" \
--latest="false" \
--notes "Automated release created from $GITHUB_ACTION_TAG tag in ${{ github.repository }}"
- name: Create release in `rancher/system-agent-installer-rke2`
env:
PAT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT_USERNAME: ${{ env.PAT_USERNAME }}
GITHUB_ACTION_TAG: ${{ env.GITHUB_ACTION_TAG }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh release create "$GITHUB_ACTION_TAG" \
--repo rancher/system-agent-installer-rke2 \
--title "$GITHUB_ACTION_TAG" \
--latest="false" \
--notes "Automated release created from $GITHUB_ACTION_TAG tag in ${{ github.repository }}"
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ publish-manifest-runtime: ## Create and push the runtime manifest
publish-binary: ## Upload binaries
./scripts/publish-binary

.PHONY: dispatch
dispatch: ## Send dispatch event to rke2-upgrade repo
./scripts/dispatch

.PHONY: package
package: build ## Package the rke2 binary
./scripts/package
Expand Down
18 changes: 0 additions & 18 deletions scripts/dispatch

This file was deleted.

0 comments on commit 132b55d

Please sign in to comment.