From 1738adf60a6b7b16a4b0b652aeef06199eb5b780 Mon Sep 17 00:00:00 2001 From: Rafael <32229014+rafaelbreno@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:06:17 -0300 Subject: [PATCH] Add `--latest` flag set to false in GH `release create` (#7598) * Add --latest flag set to false in GH release create * Remove dispatch --- .github/workflows/release.yml | 30 +++--------------------------- Makefile | 4 ---- scripts/dispatch | 18 ------------------ 3 files changed, 3 insertions(+), 49 deletions(-) delete mode 100755 scripts/dispatch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c43485f26..13615aaa8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -217,35 +217,9 @@ jobs: prime-username: ${{ env.PRIME_REGISTRY_USERNAME }} prime-password: ${{ env.PRIME_REGISTRY_PASSWORD }} - dispatch: - needs: [release-amd64, release-arm64] - runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }},image=ubuntu22-full-x64,hdd=64 - 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" - uses: rancher-eio/read-vault-secrets@main - with: - secrets: | - secret/data/github/repo/${{ github.repository }}/pat-username/credentials token | PAT_USERNAME ; - - - name: Dispatch - run: | - dapper -f Dockerfile --target dapper make dispatch - env: - PAT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PAT_USERNAME: ${{ env.PAT_USERNAME }} - GITHUB_ACTION_TAG: ${{ env.GITHUB_ACTION_TAG }} - release-downstream-components: name: "Release downstream components" - needs: [dispatch] + needs: [release-amd64, release-arm64] runs-on: ubuntu-latest permissions: contents: read @@ -276,6 +250,7 @@ jobs: 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` @@ -285,4 +260,5 @@ jobs: 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 }}" diff --git a/Makefile b/Makefile index 261afd66d9..f5dd8da866 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/scripts/dispatch b/scripts/dispatch deleted file mode 100755 index db6c3b48ad..0000000000 --- a/scripts/dispatch +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -ex - -REPO="https://api.github.com/repos/rancher/rke2-upgrade/dispatches" - -# send dispatch event to REPO -curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Content-Type: application/json" $REPO \ - --data '{"event_type": "create_tag", "client_payload": {"tag":"'"$GITHUB_ACTION_TAG"'"}}' - -SYSTEM_AGENT_INSTALLER_RKE2_REPO="https://api.github.com/repos/rancher/system-agent-installer-rke2/dispatches" - -# send dispatch event to SYSTEM_AGENT_INSTALLER_RKE2_REPO -curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Content-Type: application/json" $SYSTEM_AGENT_INSTALLER_RKE2_REPO \ - --data '{"event_type": "create_tag", "client_payload": {"tag":"'"$GITHUB_ACTION_TAG"'"}}'