Skip to content

Commit

Permalink
ci: Remove PR trigger from release workflow (#330)
Browse files Browse the repository at this point in the history
**Reason for Change**:
Remove PR trigger from release workflow. As we follow a branch based
approach.

**Requirements**

- [ ] added unit tests and e2e tests (if applicable).

**Issue Fixed**:
<!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next
line. -->

**Notes for Reviewers**:

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty authored Apr 1, 2024
1 parent 8d0976f commit c49b93a
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/publish-gh-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
release_version:
description: 'tag to be created for this image (i.e. vxx.xx.xx)'
required: true
pull_request:
types: [ closed ]


permissions:
id-token: write
Expand All @@ -21,31 +18,19 @@ env:

jobs:
check-tag:
if: >-
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.title, 'update manifest and helm charts')
)
runs-on: ubuntu-latest
environment: preset-env
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
steps:
- name: validate version
if: github.event_name == 'workflow_dispatch'
run: |
echo "${{ github.event.inputs.release_version }}" | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+$'
- id: get-tag
name: Get tag
run: |
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "tag=$(echo ${{ github.event.inputs.release_version }})" >> $GITHUB_OUTPUT
else
echo "tag=$(echo ${{ github.event.pull_request.head.ref }} | tr -d release-)" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit c49b93a

Please sign in to comment.