Skip to content

Commit

Permalink
👻 use correct branch in workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Apr 16, 2024
1 parent 59caf25 commit cae5ef1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Extract pull request number from inputs or PR description
run: |
PULL_REQUEST_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP 'Analyzer PR: \K\d+' || true)
echo "ANALYZER_REF=${CURRENT_BRANCH#refs/heads/}" >>$GITHUB_ENV
if [ ! -z "${BASE_BRANCH}" ]; then
echo "ANALYZER_REF=${BASE_BRANCH}" >>$GITHUB_ENV
fi
if [ ! -z "$PULL_REQUEST_NUMBER" ]; then
echo "ANALYZER_REF=refs/pull/$PULL_REQUEST_NUMBER/merge" >>$GITHUB_ENV
fi
echo "Using analyzer branch ${env.ANALYZER_REF}"
env:
CURRENT_BRANCH: ${{ github.ref }}
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}

- uses: actions/checkout@v3
with:
fetch-depth: 0
repository: konveyor/analyzer-lsp
ref: "${{ env.ANALYZER_REF}}"
path: analyzer-lsp

- name: Build anaylzer and save image
working-directory: analyzer-lsp
run: |
podman build -t quay.io/konveyor/analyzer-lsp:latest .
- uses: actions/checkout@v3

- name: Build image and binary
Expand Down

0 comments on commit cae5ef1

Please sign in to comment.