Skip to content

Commit

Permalink
Merge pull request #18666 from Homebrew/vendor-version-template-injec…
Browse files Browse the repository at this point in the history
…tions

workflows/vendor-version: fix `template-injection` warnings
  • Loading branch information
Bo98 authored Oct 30, 2024
2 parents 4460808 + 6bddbb5 commit 03c422d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/vendor-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,22 @@ jobs:
working-directory: ${{ steps.set-up-homebrew.outputs.gems-path }}/${{ steps.ruby-abi.outputs.version }}/gems
run: |
{
echo "vendor-version=$(cat ../.homebrew_vendor_version)"
echo "vendor-version=$(<../.homebrew_vendor_version)"
echo "ignored<<EOS"
git check-ignore -- *
echo "EOS"
} >> "${GITHUB_OUTPUT}"
- name: Compare to base ref
working-directory: ${{ steps.set-up-homebrew.outputs.gems-path }}/${{ steps.ruby-abi.outputs.version }}
env:
VENDOR_VERSION: ${{ steps.gem-info.outputs.vendor-version }}
IGNORED_GEMS: ${{ steps.gem-info.outputs.ignored }}
run: |
git checkout "origin/${GITHUB_BASE_REF}"
rm .homebrew_vendor_version
brew install-bundler-gems --groups=all
if [[ "$(cat .homebrew_vendor_version)" == "${{ steps.gem-info.outputs.vendor-version }}" ]]; then
ignored_gems="${{ steps.gem-info.outputs.ignored }}"
if [[ "$(<.homebrew_vendor_version)" == "${VENDOR_VERSION}" ]]; then
while IFS= read -r gem; do
gem_dir="./gems/${gem}"
[[ -d "${gem_dir}" ]] || continue
Expand All @@ -64,5 +66,5 @@ jobs:
fi
exit "${exit_code}"
fi
done <<< "${ignored_gems}"
done <<< "${IGNORED_GEMS}"
fi

0 comments on commit 03c422d

Please sign in to comment.