Skip to content

Commit

Permalink
Merge pull request #28 from secondlife/which-branch
Browse files Browse the repository at this point in the history
Set AUTOBUILD_VCS_BRANCH for an autobuild package.
  • Loading branch information
nat-goodspeed committed Dec 18, 2023
2 parents ab23d8e + d68810c commit 3905538
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ runs:
path: ${{ github.workspace }}/.autobuild-installables
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.configuration }}-${{ hashFiles('autobuild.xml') }}

- name: Determine branch
id: which-branch
shell: bash
run: |
# in real use, 'git branch -r --contains' should produce a single line,
# but our self-tests can emit more than one
branch="$(git branch -r --contains ${{ steps.sha.outputs.long }} | head -n 1)"
echo "branch=${branch#*/}" >> $GITHUB_OUTPUT
- name: Run autobuild
shell: ${{ steps.shell.outputs.shell }}
id: autobuild
Expand All @@ -172,6 +181,7 @@ runs:
AUTOBUILD_GITHUB_TOKEN: ${{ inputs.token }}
AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables
AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch || github.ref_name }}
AUTOBUILD_VCS_INFO: "true"
BUILD_ID: ${{ inputs.build-id }}
CONFIGURATION: ${{ inputs.configuration }}
Expand Down

0 comments on commit 3905538

Please sign in to comment.