Skip to content

Commit aaebcba

Browse files
committed
feat: add monitoring workflow to track recent workflow failures
1 parent 9c58a7b commit aaebcba

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/auto-fix.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
auto-fix:
1414
name: Auto-fix Formatting and Clippy Issues
1515
runs-on: ubuntu-latest
16-
if: "!contains(github.event.head_commit.message, '[skip auto-fix]')"
16+
if: ${{ !contains(github.event.head_commit.message, '[skip auto-fix]') }}
1717

1818
steps:
1919
- uses: actions/checkout@v4
@@ -81,8 +81,8 @@ jobs:
8181
git add .
8282
8383
# Create detailed commit message
84-
FORMAT_NEEDED="${{ steps.check.outputs.format_needed }}"
85-
CLIPPY_NEEDED="${{ steps.check.outputs.clippy_needed }}"
84+
FORMAT_NEEDED="${FORMAT_NEEDED_VAR}"
85+
CLIPPY_NEEDED="${CLIPPY_NEEDED_VAR}"
8686
COMMIT_MSG="auto-fix: apply code quality fixes [skip auto-fix]"
8787
if [ "$FORMAT_NEEDED" = "true" ]; then
8888
COMMIT_MSG="$COMMIT_MSG
@@ -101,4 +101,7 @@ jobs:
101101
echo "✅ Code quality fixes applied and pushed!"
102102
else
103103
echo "ℹ️ No changes were made by the auto-fix tools."
104-
fi
104+
fi
105+
env:
106+
FORMAT_NEEDED_VAR: ${{ steps.check.outputs.format_needed }}
107+
CLIPPY_NEEDED_VAR: ${{ steps.check.outputs.clippy_needed }}

.github/workflows/docs.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Deploy Docs
33
on:
44
push:
55
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
68
workflow_dispatch:
79

810
permissions:
@@ -17,6 +19,7 @@ concurrency:
1719
jobs:
1820
build:
1921
runs-on: ubuntu-latest
22+
if: github.event_name != 'pull_request'
2023
steps:
2124
- uses: actions/checkout@v4
2225

@@ -67,6 +70,7 @@ jobs:
6770
url: ${{ steps.deployment.outputs.page_url }}
6871
runs-on: ubuntu-latest
6972
needs: build
73+
if: github.event_name != 'pull_request'
7074
steps:
7175
- name: Deploy to GitHub Pages
7276
id: deployment
@@ -76,6 +80,9 @@ jobs:
7680
name: Docs Agent
7781
runs-on: ubuntu-latest
7882
if: github.event_name == 'pull_request'
83+
permissions:
84+
pull-requests: write
85+
contents: read
7986
steps:
8087
- uses: actions/checkout@v4
8188

@@ -87,6 +94,8 @@ jobs:
8794

8895
- name: Comment on PR if docs issues
8996
if: failure()
90-
run: gh pr comment ${{ github.event.pull_request.number }} --body "Docs agent detected issues in documentation generation."
97+
run: |
98+
gh pr comment $PR_NUMBER --body "Docs agent detected issues in documentation generation."
9199
env:
92100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
PR_NUMBER: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)