From 5af750035219bb7be3acb7ef5751de87a77bfff6 Mon Sep 17 00:00:00 2001 From: jakobmoellerdev Date: Fri, 22 Nov 2024 16:39:12 +0100 Subject: [PATCH] chore: publish to website as other # Conflicts: # .github/workflows/release.yaml --- .../workflows/publish-to-other-than-github.yaml | 14 ++++++++++++++ .github/workflows/release.yaml | 13 ++----------- .github/workflows/retrigger-publish-to-other.yaml | 7 ++++++- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-to-other-than-github.yaml b/.github/workflows/publish-to-other-than-github.yaml index 012821ff0..f4e314c50 100644 --- a/.github/workflows/publish-to-other-than-github.yaml +++ b/.github/workflows/publish-to-other-than-github.yaml @@ -150,3 +150,17 @@ jobs: https://github.com/open-component-model/ocm/releases/download/v${{ env.RELEASE_VERSION }}/ocm-${{ env.RELEASE_VERSION }}-windows-arm64.zip ` --version ${{ env.RELEASE_VERSION }} ` Open-Component-Model.ocm-cli + push-to-website: + name: Update OCM Website + runs-on: ubuntu-latest + if: github.event.client_payload.push-to-website && github.event.client_payload.version != '' + steps: + - name: Ensure proper version + run: echo "RELEASE_VERSION=$(echo ${{ github.event.client_payload.version }})" >> $GITHUB_ENV + - name: Publish Release Event + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.generate_token.outputs.token }} + repository: open-component-model/ocm-website + event-type: ocm-cli-release + client-payload: '{"tag": "${{ env.RELEASE_VERSION }}"}' \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 38aa75879..7d7b76cd1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -216,25 +216,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: make plain-push - - name: Publish Release Event - if: inputs.release_candidate == false - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ steps.generate_token.outputs.token }} - repository: open-component-model/ocm-website - event-type: ocm-cli-release - client-payload: '{"tag": "${{ env.RELEASE_VERSION }}"}' - # now distribute the release event so that other jobs can listen for this # and use the event to publish our release to other package registries - - name: Publish Release Event for other package registries + - name: Publish Release Event if: inputs.release_candidate == false uses: peter-evans/repository-dispatch@v3 with: token: ${{ steps.generate_token.outputs.token }} repository: ${{ github.repository_owner }}/ocm event-type: publish-ocm-cli - client-payload: '{"version":"${{ env.RELEASE_VERSION }}","push-to-aur":true,"push-to-chocolatey":true,"push-to-winget":true,"push-to-brew-tap":true}' + client-payload: '{"version":"${{ env.RELEASE_VERSION }}","push-to-website":true,"push-to-aur":true,"push-to-chocolatey":true,"push-to-winget":true,"push-to-brew-tap":true}' # make sure that the branch contains the next valid patch bump-release-branch-pr: diff --git a/.github/workflows/retrigger-publish-to-other.yaml b/.github/workflows/retrigger-publish-to-other.yaml index 57219180d..788a2d121 100644 --- a/.github/workflows/retrigger-publish-to-other.yaml +++ b/.github/workflows/retrigger-publish-to-other.yaml @@ -28,6 +28,11 @@ on: description: Do you want to push to the Homebrew Tap at https://github.com/open-component-model/homebrew-tap? required: false default: false + push-to-website: + type: boolean + description: Do you want to push an update to the OCM website? + required: false + default: false jobs: retrigger: @@ -62,4 +67,4 @@ jobs: token: ${{ steps.generate_token.outputs.token }} repository: ${{ github.repository_owner }}/ocm event-type: publish-ocm-cli - client-payload: '{"version":"${{ env.RELEASE_VERSION }}","push-to-aur":${{ github.event.inputs.push-to-aur }},"push-to-chocolatey":${{ github.event.inputs.push-to-chocolatey }},"push-to-winget":${{ github.event.inputs.push-to-winget }},"push-to-brew-tap":${{ github.event.inputs.push-to-brew-tap }}}' + client-payload: '{"version":"${{ env.RELEASE_VERSION }}","push-to-website":${{ github.event.inputs.push-to-website }},"push-to-aur":${{ github.event.inputs.push-to-aur }},"push-to-chocolatey":${{ github.event.inputs.push-to-chocolatey }},"push-to-winget":${{ github.event.inputs.push-to-winget }},"push-to-brew-tap":${{ github.event.inputs.push-to-brew-tap }}}'