Skip to content

Commit

Permalink
Provide DT_CHANGE_BRANCH in the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
st-pasha committed Nov 29, 2023
1 parent 7da5a90 commit 6949182
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Find build id
run: |
echo "DT_BUILD_ID=$(($(git rev-list --count origin/main) - 1))" >> $GITHUB_ENV
echo "DT_CHANGE_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
- name: Prepare environment variables
run: |
Expand Down Expand Up @@ -58,6 +59,7 @@ jobs:
echo "DT_RELEASE = $DT_RELEASE"
echo "DT_BUILD_SUFFIX = $DT_BUILD_SUFFIX"
echo "DT_BUILD_NUMBER = $DT_BUILD_NUMBER"
echo "DT_CHANGE_BRANCH = $DT_CHANGE_BRANCH"
- name: Store environment into the output
id: store
Expand All @@ -66,13 +68,15 @@ jobs:
echo "DT_RELEASE=$DT_RELEASE" >> $GITHUB_OUTPUT
echo "DT_BUILD_SUFFIX=$DT_BUILD_SUFFIX" >> $GITHUB_OUTPUT
echo "DT_BUILD_NUMBER=$DT_BUILD_NUMBER" >> $GITHUB_OUTPUT
echo "DT_CHANGE_BRANCH=$DT_CHANGE_BRANCH" >> $GITHUB_OUTPUT
outputs:
DT_HARNESS: Github
DT_BUILD_ID: ${{ steps.store.outputs.DT_BUILD_ID }}
DT_RELEASE: ${{ steps.store.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ steps.store.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ steps.store.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ steps.store.outputs.DT_CHANGE_BRANCH }}

sdist:
name: Generate sdist
Expand All @@ -85,6 +89,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -123,6 +128,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -173,6 +179,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -223,6 +230,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -273,6 +281,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -323,6 +332,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -379,6 +389,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -428,6 +439,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -477,6 +489,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -525,6 +538,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -574,6 +588,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -626,6 +641,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -675,6 +691,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -724,6 +741,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -773,6 +791,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -822,6 +841,7 @@ jobs:
DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }}
DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }}
DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }}
DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }}

steps:
- name: Checkout repository
Expand Down

0 comments on commit 6949182

Please sign in to comment.