Skip to content

Add delete file tool #74

Add delete file tool

Add delete file tool #74

name: Vercel Build Comment
on:
pull_request:
types: [opened, synchronize]
jobs:
comment-on-failure:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Wait for Vercel build
uses: patrickedqvist/[email protected]
id: waitForVercel
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 300
check_interval: 10
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Comment PR on failure
if: failure()
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
try {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: 'The Vercel build for this PR has failed. Please check the Vercel deployment logs for more information.'
});
} catch (error) {
console.error('Error posting comment:', error);
core.setFailed(`Failed to post comment: ${error.message}`);
}