Skip to content

Commit

Permalink
Add branch name suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Jan 15, 2025
1 parent 12dc618 commit 203f592
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ jobs:
# Run the commands to generate dependencies before and after and compare.
- name: Compare dependencies
run: |
BEFORE="$(mktemp -d)"
AFTER="$(mktemp -d)"
set -eux
BASE_REF="${GITHUB_BASE_REF:-master}"
# Suffixes passed to mktemp must not contain "/".
BEFORE_SUFFIX="${BASE_REF//\//_}"
AFTER_SUFFIX="${GITHUB_REF_NAME//\//_}"
BEFORE="$(mktemp -d --suffix="-${BEFORE_SUFFIX}")"
AFTER="$(mktemp -d --suffix="-${AFTER_SUFFIX}")"
scripts/gen-deps.sh "${AFTER}"
# GITHUB_BASE_REF is set when the job is triggered by a PR.
git checkout origin/"${GITHUB_BASE_REF:-master}"
git checkout origin/"${BASE_REF}"
scripts/gen-deps.sh "${BEFORE}"
echo "Comparing dependencies..."
Expand Down

0 comments on commit 203f592

Please sign in to comment.