-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 1.23 KB
/
weekly-music.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Generate Weekly Listened to Blog Post
on:
workflow_dispatch:
schedule:
- cron: "00 02 * * 1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "👨💻 Check out code"
uses: actions/checkout@v3
- name: "🐍 Set up Python"
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "pip"
cache-dependency-path: "generate_blog_post.txt"
- name: "🦾 Install dependencies"
run: pip install -r generate_blog_post.txt
- name: "🏃♂️ Run the python script to generate blog post"
env:
LASTFM_USER: "${{ secrets.LASTFM_USER }}"
LASTFM_API_KEY: "${{ secrets.LASTFM_API_KEY }}"
COLLECTION_URL: "${{ secrets.COLLECTION_URL }}"
OPENAI_KEY: "${{ secrets.OPENAI_KEY }}"
run: python generate_blog_post.py
- name: "🚨 Create Pull Request"
uses: peter-evans/create-pull-request@v5
with:
token: "${{ secrets.GITHUB_TOKEN }}"
commit-message: "🤖 Add weekly listened to blog posts"
title: "🤖 Add weekly listened to blog posts"
body: "This week, I have mostly been listening to..."
branch: "weekly-listened-to-blog-post"
branch-suffix: timestamp