Skip to content

Commit

Permalink
testing actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubdotpy3d committed Jan 11, 2025
1 parent 093391b commit 9795277
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/take_screenshot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os

cookie = os.environ['COOKIE']

print(f'cookie: {cookie:10}')

print('taking screenshot')
1 change: 1 addition & 0 deletions .github/scripts/update_readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print('updating readme')
36 changes: 36 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update Screenshot in README

on:
push:
branches:
- master

jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Python and Playwright
run: |
pip install uv
uvx playwright install
- name: Take Screenshot
env:
COOKIE: ${{ secrets.COOKIE }}
run: |
uv run take_screenshot.py
- name: Update README
run: |
uv run update_readme.py
#
# - name: Commit and Push Changes
# run: |
# git config user.name "GitHub Actions"
# git config user.email "[email protected]"
# git add README.md screenshot.png
# git commit -m "Update screenshot in README"
# git push

0 comments on commit 9795277

Please sign in to comment.