It's Wednesday my dudes! #37
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: It's Wednesday my dudes! | |
# Events that trigger the workflow | |
on: | |
schedule: | |
- cron: '0 0 * * 3' | |
workflow_dispatch: | |
# Jobs that run in parallel | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
environment: wednesday | |
# Environment variables | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
OPENAI_PROMPT: ${{ vars.OPENAI_PROMPT }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Make script executable | |
run: | | |
chmod +x scripts/generate_image.sh | |
- name: Generate image | |
run: | | |
./scripts/generate_image.sh | |
- name: Commit and push if successful | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "github-actions@github.com" | |
git add . | |
git commit -m "Generated image on $(date)" | |
git push |