-
Notifications
You must be signed in to change notification settings - Fork 49
59 lines (47 loc) · 1.67 KB
/
generate-image-wall-on-demand-for-anyone.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: generate-image-wall-demo-for-anyone
on:
workflow_dispatch:
inputs:
doubanId:
description: 'douban id:'
required: true
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
steps:
- name: checkout repo content
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.11.1'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute py script to generate movie poster wall
run: python image_wall.py -i=${{ github.event.inputs.doubanId }} -c=18 -r=8 -o=8 -rd=True
- name: execute py script to generate album cover wall
run: python image_wall.py -i=${{ github.event.inputs.doubanId }} -m='music' -c=10 -r=8 -o=8 -rd=True
- name: commit caches
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add cache/
git commit -m "Update global image cache" -a
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: archive results
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.inputs.doubanId }}
retention-days: 1
path: |
output/${{ github.event.inputs.doubanId }}_movie.jpg
output/${{ github.event.inputs.doubanId }}_music.jpg