Skip to content

Commit

Permalink
updated gist-sync.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Mar 22, 2024
1 parent 4243a34 commit 2634846
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/gist-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ jobs:
run: |
for readme in *.md; do
if gh gist list -L 2000 --public | awk '{print $2}' | grep -Fxq "$readme"; then
id="$(gh gist list -L 2000 --public | awk "/^[[:alnum:]]{32}[[:space:]]+$readme / {print \$1; exit}")"
id="$(gh gist list -L 2000 --public | awk "/^[[:alnum:]]{32}[[:space:]]+$readme / {print \$1; exit}" || :)"
if [ -z "$id" ]; then
echo "Failed to determine ID for gist of file '$readme'"
exit 1
fi
gist_contents="$(gh gist view "$id" --filename "$readme" --raw)"
readme_contents="$(cat "$readme")"
if [ "$gist_contents" != "$readme_contents" ]; then
Expand Down

0 comments on commit 2634846

Please sign in to comment.