Skip to content

fix: correct permissions and action paths for workflow tests #338

fix: correct permissions and action paths for workflow tests

fix: correct permissions and action paths for workflow tests #338

# This isn't a reusable workflow but an actual CI action for this repo itself - to test the workflows.

Check failure on line 1 in .github/workflows/danger-workflow-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/danger-workflow-tests.yml

Invalid workflow file

(Line: 19, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.sha
name: Danger Workflow Tests
on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review]
permissions:
contents: read
pull-requests: write
jobs:
# Test Danger action on pull requests - should analyze PR and report findings
test-danger-pr-analysis:
runs-on: ubuntu-latest
steps:
- name: Run danger action
id: danger
uses: getsentry/github-workflows/danger@${{ github.sha }}
- name: Validate danger outputs
env:
DANGER_OUTCOME: ${{ steps.danger.outputs.outcome }}
run: |
echo "🔍 Validating Danger action outputs..."
echo "Danger Outcome: '$DANGER_OUTCOME'"
# Validate that Danger ran successfully
if [[ "$DANGER_OUTCOME" != "success" ]]; then
echo "❌ Expected Danger outcome 'success', got '$DANGER_OUTCOME'"
echo "This could indicate:"
echo " - Danger found issues that caused it to fail"
echo " - The action itself encountered an error"
echo " - Docker container issues"
exit 1
fi
echo "✅ Danger PR analysis completed successfully!"
echo "ℹ️ Check the PR comments for any Danger findings"