Skip to content

Commit 9795277

Browse files
committed
testing actions
1 parent 093391b commit 9795277

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.github/scripts/take_screenshot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
3+
cookie = os.environ['COOKIE']
4+
5+
print(f'cookie: {cookie:10}')
6+
7+
print('taking screenshot')

.github/scripts/update_readme.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print('updating readme')

.github/workflows/update_readme.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update Screenshot in README
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update-readme:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v4
14+
15+
- name: Install Python and Playwright
16+
run: |
17+
pip install uv
18+
uvx playwright install
19+
20+
- name: Take Screenshot
21+
env:
22+
COOKIE: ${{ secrets.COOKIE }}
23+
run: |
24+
uv run take_screenshot.py
25+
26+
- name: Update README
27+
run: |
28+
uv run update_readme.py
29+
#
30+
# - name: Commit and Push Changes
31+
# run: |
32+
# git config user.name "GitHub Actions"
33+
# git config user.email "actions@github.com"
34+
# git add README.md screenshot.png
35+
# git commit -m "Update screenshot in README"
36+
# git push

0 commit comments

Comments
 (0)