Skip to content

Commit 76baee5

Browse files
hesreallyhimclaude
andcommitted
fix: update GitHub Actions workflow to use new output syntax
- Replace deprecated ::set-output in validate-links.yml with $GITHUB_OUTPUT - Update Python script to print JSON to stdout for workflow capture - Also write to GITHUB_OUTPUT when available for future compatibility - Fix whitespace linting issue This completes the migration away from deprecated GitHub Actions syntax while maintaining backward compatibility with the existing workflow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2cb2daa commit 76baee5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/validate-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
id: validate
3434
run: |
3535
make validate-github > validation_results.json
36-
echo "::set-output name=has_broken_links::$(python -c "import json; data=json.load(open('validation_results.json')); print('true' if data['broken_links'] else 'false')")"
36+
echo "has_broken_links=$(python -c "import json; data=json.load(open('validation_results.json')); print('true' if data['broken_links'] else 'false')")" >> "$GITHUB_OUTPUT"
3737
3838
- name: Upload validation results
3939
if: always()

scripts/validate_links.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,14 @@ def main():
416416

417417
if args.github_action:
418418
# Output JSON for GitHub Action
419+
# Always print the JSON results for capture by the workflow
420+
print(json.dumps(results))
421+
422+
# Also write to GITHUB_OUTPUT if available
419423
github_output = os.getenv("GITHUB_OUTPUT")
420424
if github_output:
421425
with open(github_output, "a") as f:
422426
f.write(f"validation-results={json.dumps(results)}\n")
423-
else:
424-
print(f"validation-results={json.dumps(results)}")
425427

426428
# Set action failure if broken links found
427429
if results["newly_broken"] > 0:

0 commit comments

Comments
 (0)