Skip to content

Commit

Permalink
Merge pull request quarkusio#15516 from famod/incremental-base-fix
Browse files Browse the repository at this point in the history
CI: fix PULL_REQUEST_BASE for incremental build
  • Loading branch information
gsmet authored Mar 8, 2021
2 parents 89e244b + b1153f8 commit c312809
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Get GIB arguments
id: get-gib-args
env:
PULL_REQUEST_BASE: ${{ github.event.pull_request.base.sha }}
PULL_REQUEST_BASE: ${{ github.event.pull_request.base.ref }}
run: |
# See also: https://github.com/gitflow-incremental-builder/gitflow-incremental-builder#configuration (GIB)
# Common GIB_ARGS for all CI cases (hint: see also root pom.xml):
Expand All @@ -126,12 +126,12 @@ jobs:
GIB_ARGS="-Dincremental -Dgib.disableSelectedProjectsHandling -Dgib.untracked=false -Dgib.uncommitted=false"
if [ -n "$PULL_REQUEST_BASE" ]
then
# The PR defines a clear merge target so just use that branch for reference, *unless*
# The PR defines a clear merge target so just use that branch for reference, *unless*:
# - the current branch is a backport branch
GIB_ARGS+=" -Dgib.referenceBranch=$PULL_REQUEST_BASE -Dgib.disableIfBranchRegex='.*backport.*'"
GIB_ARGS+=" -Dgib.referenceBranch=origin/$PULL_REQUEST_BASE -Dgib.disableIfBranchRegex='.*backport.*'"
else
# No PR means the merge target is uncertain so fetch & use master of quarkusio/quarkus, *unless*:
# - the current branch is master or some released branch like 1.10 (TODO: introduce tags to use as reference)
# - the current branch is master or some released branch like 1.10
# - the current branch is a backport branch targeting some released branch like 1.10 (merge target is not master)
GIB_ARGS+=" -Dgib.referenceBranch=refs/remotes/quarkusio/master -Dgib.fetchReferenceBranch -Dgib.disableIfBranchRegex='master|\d+\.\d+|.*backport.*'"
fi
Expand Down

0 comments on commit c312809

Please sign in to comment.