Run PHP #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run PHP | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '0 5 * * 1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run the script | |
env: | |
USER_ID: ${{ secrets.USER_ID }} | |
run: php update.php | |
- name: Commit changes | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "update $(date '+%Y-%m-%d')" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create a new release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: "v$(date '+%Y%m%d')" | |
release_name: "Release $(date '+%Y-%m-%d')" | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |