add: ci workflow to automatically set git file permissions

This commit is contained in:
Roardom
2025-09-27 05:25:23 +00:00
parent 074892c5d2
commit 5adf4f8931

26
.github/workflows/file-permissions.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: File permissions
on: [ push, pull_request ]
jobs:
pint:
strategy:
matrix:
operating-system:
- ubuntu-22.04
name: ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set file permissions
run: sudo find ${{ github.workspace }} -type f -exec chmod 664 {} \;
- name: Set folder permissions
run: sudo find ${{ github.workspace }} -type d -exec chmod 775 {} \;
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "automation: set git file permissions"
commit_user_name: unit3d-bot
commit_user_email: unit3d_gh_bot@protonmail.com
commit_author: unit3d-bot <unit3d_gh_bot@protonmail.com>