Skip to content

Commit

Permalink
Update schedule_adult_playlist.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gogetta69 authored Jul 2, 2024
1 parent 5ee7271 commit 4da5dae
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/schedule_adult_playlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.RUN_ACTIONS }} # Use GITHUB_TOKEN for authentication
token: ${{ secrets.RUN_ACTIONS }}

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4' # Specify your PHP version
php-version: '7.4'

- name: Run Adult Playlist PHP script
run: php php/create_adult_playlist.php
env:
SECRET_API_KEY: ${{ secrets.SECRET_API_KEY }}

- name: Validate JSON file
id: validate_json
run: |
if php -r "json_decode(file_get_contents('adult-movies.json')); if (json_last_error() !== JSON_ERROR_NONE) { exit(1); }"; then
echo "JSON is valid"
else
echo "JSON is invalid"
exit 1
fi
- name: Commit and Push to Public Repository
if: steps.validate_json.outcome == 'success'
run: |
git config user.name "gogetta69"
git config user.email "gogetta.teams@gmail.com"
Expand Down

0 comments on commit 4da5dae

Please sign in to comment.