From a05dce812557fa550b908e91cfb66afe06fc742b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 12 May 2025 16:50:20 +0200 Subject: [PATCH] main (#3391) * ci(actions): Update pr description Signed-off-by: rjshrjndrn * ci(actions): run only on pull request merge Signed-off-by: rjshrjndrn --------- Signed-off-by: rjshrjndrn --- .github/workflows/patch-build.yaml | 3 +-- .github/workflows/update-tag.yaml | 14 ++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/patch-build.yaml b/.github/workflows/patch-build.yaml index f35c738bc..c6ef462c1 100644 --- a/.github/workflows/patch-build.yaml +++ b/.github/workflows/patch-build.yaml @@ -147,8 +147,7 @@ jobs: pr_title: "Updated patch build from main ${{ env.HEAD_COMMIT_ID }}" pr_body: | This PR updates the Helm chart version after building the patch from $HEAD_COMMIT_ID. - Once this PR is merged, To update the latest tag, run the following workflow. - https://github.com/openreplay/openreplay/actions/workflows/update-tag.yaml + Once this PR is merged, tag update job will run automatically. # - name: Debug Job # if: ${{ failure() }} diff --git a/.github/workflows/update-tag.yaml b/.github/workflows/update-tag.yaml index 19ac7a024..edbeaa4e4 100644 --- a/.github/workflows/update-tag.yaml +++ b/.github/workflows/update-tag.yaml @@ -1,21 +1,15 @@ on: - workflow_dispatch: - inputs: - services: - description: "This action will update the latest tag with current main branch HEAD. Should I proceed ? true/false" - required: true - default: "false" - push: + pull_request: + types: [closed] branches: - main - name: Release tag update --force jobs: deploy: name: Build Patch from main runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event.inputs.services == 'true' }} + if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event.inputs.services == 'true' }} steps: - name: Checkout uses: actions/checkout@v2 @@ -46,4 +40,4 @@ jobs: git fetch --tags git checkout main echo "Updating tag ${{ env.LATEST_TAG }} to point to latest commit on main" - git push origin HEAD:refs/tags/${{ env.LATEST_TAG }} --force \ No newline at end of file + git push origin HEAD:refs/tags/${{ env.LATEST_TAG }} --force