Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 34 additions & 13 deletions .github/workflows/merge_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,37 @@ jobs:
malloc-impl: ${{ matrix.malloc-impl }}
prerelease: ${{ matrix.prerelease }}
tooling: ${{ matrix.tooling }}
# ChainBuild:
# runs-on: "ubuntu-22.04"
# steps:
# - name: Start HomeObject Build
# run: |
# curl -L \
# -X POST \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}"\
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/eBay/homeobject/actions/workflows/conan_build.yml/dispatches \
# -d '{"ref":"main","inputs":{}}'
# if: ${{ github.ref == 'refs/heads/master' }}
ChainBuild:
needs: Build
runs-on: "ubuntu-24.04"
steps:
Comment thread
xiaoxichen marked this conversation as resolved.
- name: Get HomeObject default branch
id: get-branch
run: |
set -euo pipefail

DEFAULT_BRANCH=$(curl --fail --show-error --silent --location \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/eBay/homeobject \
| jq -r '.default_branch')

if [ -z "$DEFAULT_BRANCH" ] || [ "$DEFAULT_BRANCH" = "null" ]; then
echo "Failed to determine HomeObject default branch from GitHub API response" >&2
exit 1
fi

echo "default_branch=$DEFAULT_BRANCH" >> "$GITHUB_OUTPUT"
echo "HomeObject default branch: $DEFAULT_BRANCH"

- name: Start HomeObject Build
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.CHAIN_BUILD_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/eBay/homeobject/actions/workflows/conan_build.yml/dispatches \
-d '{"ref":"${{ steps.get-branch.outputs.default_branch }}","inputs":{}}'
if: ${{ github.ref == 'refs/heads/stable/v7.x' }}
Loading