-
-
Notifications
You must be signed in to change notification settings - Fork 174
Update from main #1406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update from main #1406
Changes from all commits
8d61bab
0d4da31
8e55e68
11f426b
97a3638
2cd3eac
7baeffa
8a2ebe7
f1ebbfb
47ff705
9fb2a3c
61e9d9b
a133de7
85f373a
ebbacb6
1360544
f078cf4
ddc1045
479a9f9
e3f2760
ed50226
eb7d5da
d2eea75
3e2c8a2
b4003e0
60ddb51
189fc18
1dd27d6
3237d66
8fde66c
64dd629
175a37f
2046f32
50ed0d0
903be2b
1593213
c3e126d
0cb1102
c8d6c51
84db074
67d221b
a81265d
102b48d
34106bc
05bf6ff
a7a6b13
45dc045
ba19caa
ce9527d
e9bce98
b112ce1
55685ec
841f9ce
af53561
8c9d303
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,73 @@ | |||||||||||||||||||||||||||||
| name: Deploy to Rollbar | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||
| push: | |||||||||||||||||||||||||||||
| branches: | |||||||||||||||||||||||||||||
| - main | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||
| rollbar-deploy: | |||||||||||||||||||||||||||||
| if: github.repository == 'cheeaun/phanpy' | |||||||||||||||||||||||||||||
| concurrency: | |||||||||||||||||||||||||||||
| group: rollbar-deploy | |||||||||||||||||||||||||||||
| cancel-in-progress: true | |||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Setup Node.js | |||||||||||||||||||||||||||||
| uses: actions/setup-node@v6 | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| node-version: 24 | |||||||||||||||||||||||||||||
| cache: "npm" | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Install dependencies | |||||||||||||||||||||||||||||
| run: npm ci | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Build | |||||||||||||||||||||||||||||
| run: npm run build | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Get commit info | |||||||||||||||||||||||||||||
| id: commit | |||||||||||||||||||||||||||||
| run: | | |||||||||||||||||||||||||||||
| COMMIT_HASH=$(git rev-parse --short HEAD) | |||||||||||||||||||||||||||||
| echo "version=$COMMIT_HASH" >> $GITHUB_OUTPUT | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Gather source map paths | |||||||||||||||||||||||||||||
| id: maps | |||||||||||||||||||||||||||||
| run: | | |||||||||||||||||||||||||||||
| set -e | |||||||||||||||||||||||||||||
| # Find all .js.map files under dist and produce a space-separated list | |||||||||||||||||||||||||||||
| SOURCE_MAPS=$(find dist -type f -name '*.js.map' -print | tr '\n' ' ' | sed -E 's/ $//' || true) | |||||||||||||||||||||||||||||
| if [ -z "$SOURCE_MAPS" ]; then | |||||||||||||||||||||||||||||
| echo "No source maps found under dist" | |||||||||||||||||||||||||||||
| echo "source_maps=" >> $GITHUB_OUTPUT | |||||||||||||||||||||||||||||
| echo "minified_urls=" >> $GITHUB_OUTPUT | |||||||||||||||||||||||||||||
| exit 0 | |||||||||||||||||||||||||||||
| fi | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| # Derive minified URLs from each map file. Preserve path under `dist`. | |||||||||||||||||||||||||||||
| HOST_BASE="https://dev.phanpy.social" | |||||||||||||||||||||||||||||
| MINIFIED_URLS="" | |||||||||||||||||||||||||||||
| for map_path in $SOURCE_MAPS; do | |||||||||||||||||||||||||||||
| rel_path=${map_path#dist/} | |||||||||||||||||||||||||||||
| minified_rel_path=${rel_path%.map} | |||||||||||||||||||||||||||||
| if [ -z "$MINIFIED_URLS" ]; then | |||||||||||||||||||||||||||||
| MINIFIED_URLS="$HOST_BASE/$minified_rel_path" | |||||||||||||||||||||||||||||
| else | |||||||||||||||||||||||||||||
| MINIFIED_URLS="$MINIFIED_URLS $HOST_BASE/$minified_rel_path" | |||||||||||||||||||||||||||||
| fi | |||||||||||||||||||||||||||||
| done | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| echo "source_maps=$SOURCE_MAPS" >> $GITHUB_OUTPUT | |||||||||||||||||||||||||||||
| echo "minified_urls=$MINIFIED_URLS" >> $GITHUB_OUTPUT | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Deploy to Rollbar | |||||||||||||||||||||||||||||
| uses: rollbar/github-deploy-action@2.1.2 | |||||||||||||||||||||||||||||
| env: | |||||||||||||||||||||||||||||
| ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }} | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| environment: "development" | |||||||||||||||||||||||||||||
| version: ${{ steps.commit.outputs.version }} | |||||||||||||||||||||||||||||
| source_maps: ${{ steps.maps.outputs.source_maps }} | |||||||||||||||||||||||||||||
| minified_urls: ${{ steps.maps.outputs.minified_urls }} | |||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+73
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 5 months ago To fix the problem, we should explicitly set the GITHUB_TOKEN permissions for this workflow/job to the minimum required. This workflow only needs to read the repository contents (for The best fix is to add a permissions:
contents: readindented to align with
Suggested changeset
1
.github/workflows/rollbar-deploy.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
|||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.