Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Sep 18, 2024
1 parent dd683bd commit f94bd43
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/generate-bundle-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Generate Bundle CDN URL
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- '**' # This will trigger the workflow for commits to any branch

jobs:
generate-url:
Expand Down Expand Up @@ -32,10 +35,12 @@ jobs:
const fs = require('fs');
const url = fs.readFileSync('url.txt', 'utf8').trim();
const pr_number = process.env.GITHUB_REF.split('/').pop();
const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
const octokit = require('@actions/github').getOctokit(process.env.GITHUB_TOKEN);
await octokit.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
body: `### Test Bundle URL: \n\n[Preview script bundle](${url})\n\n${context.payload.pull_request.body}`
body: `### Test Bundle URL:\n\n[Preview script bundle](${url})\n\n${context.payload.pull_request.body}`
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f94bd43

Please sign in to comment.