2023-02-12 05:41:04 +03:00
|
|
|
name: Take nightly screenshots
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 4 * * *'
|
|
|
|
|
|
|
|
env:
|
|
|
|
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
|
|
|
|
BROWSERSTACK_PASSWORD: ${{ secrets.BROWSERSTACK_PASSWORD }}
|
|
|
|
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
2023-02-12 22:53:21 +03:00
|
|
|
TEST_URL: http://localhost:8080
|
2023-02-12 05:41:04 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Screenshots:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-10-07 23:52:25 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 04:51:40 +03:00
|
|
|
- uses: actions/setup-go@v5
|
2023-02-12 05:41:04 +03:00
|
|
|
with:
|
2023-10-18 04:32:50 +03:00
|
|
|
go-version: '1.21'
|
2023-02-16 02:01:14 +03:00
|
|
|
cache: true
|
2023-02-12 05:41:04 +03:00
|
|
|
|
2023-02-16 01:46:45 +03:00
|
|
|
- name: Cache node modules
|
2024-03-04 05:45:28 +03:00
|
|
|
uses: actions/cache@v4
|
2023-02-16 01:46:45 +03:00
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules-screenshots
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('test/automated/screenshots/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-
|
|
|
|
${{ runner.os }}-
|
|
|
|
|
2023-02-12 05:41:04 +03:00
|
|
|
- name: Automate screenshots
|
2024-04-10 04:23:40 +03:00
|
|
|
uses: nick-fields/retry@v3
|
2023-02-12 05:41:04 +03:00
|
|
|
with:
|
|
|
|
timeout_minutes: 10
|
|
|
|
max_attempts: 4
|
|
|
|
command: cd test/automated/screenshots && ./run.sh
|
|
|
|
|
|
|
|
- name: Commit changes
|
|
|
|
uses: EndBug/add-and-commit@v9
|
|
|
|
with:
|
|
|
|
author_name: Owncast
|
|
|
|
author_email: owncast@owncast.online
|
|
|
|
message: 'Commit screenshots'
|
2023-02-12 06:32:26 +03:00
|
|
|
add: '*.png'
|
2023-02-12 05:41:04 +03:00
|
|
|
pull: '--rebase --autostash'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Dispatch event to web site
|
2024-03-04 05:58:33 +03:00
|
|
|
uses: peter-evans/repository-dispatch@v3
|
2023-02-12 05:41:04 +03:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.BUNDLE_STORYBOOK_OWNCAST_ONLINE }}
|
|
|
|
repository: owncast/owncast.github.io
|
|
|
|
event-type: bundle-components-library
|