Skip to content

Commit 4fa1d15

Browse files
committed
Fix
1 parent 39a51bb commit 4fa1d15

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/pr-cleanup.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
if: always()
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
18+
permissions:
19+
contents: write
1820
steps:
1921
- name: Clean artifacts
2022
run: |
@@ -41,12 +43,12 @@ jobs:
4143
--silent \
4244
-H "Accept: application/vnd.github+json" \
4345
-H "X-GitHub-Api-Version: 2022-11-28" \
44-
/repos/${OWNER}/${REPOSITORY}/actions/artifacts/${ID}
46+
/repos/${REPOSITORY_OWNER}/${REPOSITORY_NAME}/actions/artifacts/${ID}
4547
done
4648
env:
4749
GH_TOKEN: ${{ github.token }}
48-
OWNER: ${{ github.repository_owner }}
49-
REPOSITORY: ${{ github.repository.name }}
50+
REPOSITORY_OWNER: ${{ github.repository_owner }}
51+
REPOSITORY_NAME: ${{ github.event.repository.name }}
5052
BRANCH: ${{ github.head_ref }}
5153

5254
clean-documentation-preview:
@@ -60,7 +62,9 @@ jobs:
6062
sudo apt-get update
6163
sudo apt-get install -y rclone
6264
echo "${{ inputs.CONFIGURATION }}" > rclone.configuration
63-
rclone --config rclone.configuration prune ${PROVIDER}:${BUCKET}/${PULL_REQUEST_NUMBER}/
65+
# -q
66+
# rclone --config rclone.configuration purge ${PROVIDER}:${BUCKET}/${PULL_REQUEST_NUMBER}/
67+
rclone --config rclone.configuration purge ${BUCKET}:/${PULL_REQUEST_NUMBER}/
6468
env:
6569
CONFIGURATION: ${{ secrets.RCLONE_CONFIG_DOC_PREVIEW }}
6670
PROVIDER: scaleway

0 commit comments

Comments
 (0)