Skip to content

Commit

Permalink
Github action workflow to run build for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig committed Jul 11, 2024
1 parent fe3cb37 commit a3bf42e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/clrt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*' # 2021.01.x
tags:
- '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' # 2021.01.01
pull_request:
branches:
- main

workflow_dispatch:
inputs:
Expand All @@ -28,9 +31,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Extract branch name
id: extract_branch
run: echo "BRANCH_NAME=$(basename ${{ github.ref }})" >> $GITHUB_ENV
- name: Extract branch or PR number
id: extract_branch_or_pr
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "BRANCH_OR_PR=pr-${{ github.event.number }}" >> $GITHUB_ENV
else
echo "BRANCH_OR_PR=$(basename ${{ github.ref }})" >> $GITHUB_ENV
- name: build Docker image
run: |
Expand Down

0 comments on commit a3bf42e

Please sign in to comment.