Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gha): only bump halyard on master (backport #6268) #6269

Merged
merged 1 commit into from
Aug 17, 2024
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Given a tag, determine what branch we are on, so we can bump dependencies (or not)
- name: Get Branch
run: |
BRANCHES=$(git branch -r --contains ${{ github.ref }})
echo "BRANCHES is '${BRANCHES}'"
# Check for no branches explicitly...Otherwise echo adds a newline so wc thinks there's
# one branch. And echo -n makes it appears that there's one less branch than there
# actually is.
if [ -z "$BRANCHES" ]; then
echo "exactly one branch required to release clouddriver, but there are none"
exit 1
fi
NUM_BRANCHES=$(($(echo "$BRANCHES" | wc -l)))
echo "NUM_BRANCHES is '${NUM_BRANCHES}'"
if [ $NUM_BRANCHES -ne 1 ]; then
echo "exactly one branch required to release clouddriver, but there are $NUM_BRANCHES ($BRANCHES)"
exit 1
fi
echo "exactly one branch ($BRANCHES)"
echo BRANCH=$BRANCHES >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down Expand Up @@ -150,8 +170,12 @@ jobs:
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Pause before dependency bump
# The only dependency to bump is halyard, which only consumes from
# master since it has a different versioning scheme.
if: env.BRANCH == 'origin/master'
run: sleep 900
- name: Trigger dependency bump workflow
if: env.BRANCH == 'origin/master'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SPINNAKER_GITHUB_TOKEN }}
Expand Down