diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2023-01-01 03:18:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-01 03:18:47 -0500 |
commit | 0adefababf1337576a46dd13ced5903db39a71dd (patch) | |
tree | 758920e17c45f01cc2e44b1f6b8aee325b203beb /.github | |
parent | 543fd6c04707abadd83677d2778557cff94ce1ea (diff) |
ci: use a better way of getting branch from tagged builds for CirrusCI (#948)
* ci: use a better way of getting branch from tagged builds for CirrusCI
* add a bit more logging
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build_releases.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index d062a98b..08cd03d6 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -267,7 +267,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - fetch-depth: 1 + fetch-depth: 0 - name: Create release directory run: | @@ -277,7 +277,13 @@ jobs: env: CIRRUS_KEY: ${{ secrets.CIRRUS_TOKEN }} run: | - python ./scripts/cirrus/build.py "${{ github.ref_name }}" "${{ github.ref_type }}" "release/" "${{ inputs.caller }}" + if [[ "${{ github.ref_type }}" == "branch" ]]; then + BRANCH="${{ github.ref_name }}"; + else + raw=$(git branch -r --contains '${{ github.ref_name }}'); + BRANCH=${raw##*/}; + fi + python ./scripts/cirrus/build.py "$BRANCH" "release/" "${{ inputs.caller }}" - name: Save release as artifact uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 |