Skip to content

chore: add workflow permission for PR creation (#271) #3

chore: add workflow permission for PR creation (#271)

chore: add workflow permission for PR creation (#271) #3

Workflow file for this run

name: Update screenshots
on:
push:
branches:
- main
jobs:
run-docker:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Run screenshotter container
run: docker run -v $(pwd):/app ghcr.io/gokarna-theme/gokarna-hugo/screenshotter
- name: See diffs
run: |
if [[ -z $(git status images --porcelain) ]]; then
echo "No changes found"
exit 0
fi
gh pr create -B main -H auto-update-screenshots --title 'chore: update screenshots' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}