Screenshot Updater #477
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Screenshot Updater | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
preprod-check: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Generate new screenshots | |
run: ./scripts/generate_screenshots.sh pre-prod | |
staging-check: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Generate new screenshots | |
run: ./scripts/generate_screenshots.sh staging | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Generate new screenshots | |
run: ./scripts/generate_screenshots.sh prod | |
- name: Push changes | |
run: | | |
if [[ $(git status --porcelain) ]]; then | |
git config user.name "Rapidfort Readme Bot" | |
git config user.email "info@rapidfort.com" | |
git add . && git commit -am "Update screenshots for images via script" --signoff && git push --force | |
fi |