mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Fix pr preview vulnerability (#5461)
* Closes #5458 * [x] I have followed the instructions in the PR template
This commit is contained in:
9
.github/workflows/preview_cleanup.yml
vendored
9
.github/workflows/preview_cleanup.yml
vendored
@@ -15,9 +15,14 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- run: mkdir -p empty_dir
|
||||
- name: Url slug variable
|
||||
- name: Generate URL_SLUG
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
URL_SLUG: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}
|
||||
run: |
|
||||
echo "URL_SLUG=${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
||||
# Sanitize the URL_SLUG to only contain alphanumeric characters and dashes
|
||||
URL_SLUG=$(echo $URL_SLUG | tr -cd '[:alnum:]-')
|
||||
echo "URL_SLUG=$URL_SLUG" >> $GITHUB_ENV
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user