Skip to content

Commit

Permalink
workflows/vendor-version: fix template-injection warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Oct 30, 2024
1 parent 6469a24 commit 6bddbb5
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 6bddbb5

Please sign in to comment.