Skip to content

Commit

Permalink
ci: remove pull request trigger (#116)
Browse files Browse the repository at this point in the history
Remove PR trigger from release workflow. As we follow a branch based
approach.

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty authored Apr 1, 2024
1 parent afff7aa commit b9ba6fc
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 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
environment: e2e-test
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
echo "tag=$(echo ${{ github.event.inputs.release_version }})" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -133,13 +118,10 @@ jobs:
E2E_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
E2E_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
E2E_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
E2E_AMRT_SECRET_NAME: ${{ secrets.AMRT_SECRET_NAME }}
E2E_ACR_AMRT_USERNAME: ${{ secrets.ACR_AMRT_USERNAME }}
E2E_ACR_AMRT_PASSWORD: ${{ secrets.ACR_AMRT_PASSWORD }}

publish-mcr-image:
runs-on: ubuntu-latest
environment: preset-env
environment: e2e-test
needs: [ check-tag, run-e2e-gh-image ]
steps:
- name: 'Dispatch release tag'
Expand Down

0 comments on commit b9ba6fc

Please sign in to comment.