Skip to content

Commit bb19612

Browse files
committed
fix: skip homebrew update outside upstream
1 parent 357431a commit bb19612

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
env:
2020
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
2121
run: |
22-
if [ -n "$HOMEBREW_TAP_TOKEN" ]; then
22+
if [ "$GITHUB_REPOSITORY" != "wxtsky/CodeIsland" ]; then
23+
echo "available=false" >> "$GITHUB_OUTPUT"
24+
echo "Skipping Homebrew tap update for fork repository $GITHUB_REPOSITORY."
25+
elif [ -n "$HOMEBREW_TAP_TOKEN" ]; then
2326
echo "available=true" >> "$GITHUB_OUTPUT"
2427
else
2528
echo "available=false" >> "$GITHUB_OUTPUT"
@@ -76,5 +79,9 @@ jobs:
7679
git config user.name "github-actions[bot]"
7780
git config user.email "github-actions[bot]@users.noreply.github.com"
7881
git add Casks/codeisland.rb
82+
if git diff --cached --quiet; then
83+
echo "Homebrew cask is already up to date."
84+
exit 0
85+
fi
7986
git commit -m "Update codeisland to ${VERSION}"
8087
git push

0 commit comments

Comments
 (0)