Skip to content
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

Adjust owner instead of setting full permissions for json files #43

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/setup_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ jobs:
- name: Run tests
run: |
composer validate --strict

- name: Run pest tests
run: |
bash install.sh
composer test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add pest test to workflows

7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ for file in "${json_files[@]}"; do
done

if [[ "$(uname -s -r)" == *"Linux"* && "$(cat /etc/os-release)" == *"Ubuntu"* ]]; then
chmod 777 storage/json/tgn/*.json
# shellcheck disable=SC2196
OWNER=$(ps aux | egrep '(apache|httpd|nginx)' | grep -v root | head -n1 | awk '{print $1}')
if [ -z "$OWNER" ]; then
OWNER=$(whoami)
fi
sudo chown -R "$OWNER":"$OWNER" storage/json/tgn
fi

echo "Telegram Git Notifier config files are ready!"