Merge pull request #37 from raffaem/permissions #65
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: Update previews | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get list of wallpapers | |
run: ls wallpapers/ > wallpaper-preview.md | |
- name: Add markdown syntax for image preview on each line | |
run: | | |
sed -i -e 's/^/![](wallpapers\//' wallpaper-preview.md | |
sed -i 's/$/\)/' wallpaper-preview.md | |
- name: Add heading and an empty line | |
run: | | |
sed -i '1 i\# Wallpapers in this repository' wallpaper-preview.md | |
sed -i '/# Wallpapers/ a \ ' wallpaper-preview.md | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Auto update" -a | |
- name: Push changes # push the output folder to your repo | |
run: echo 'I ran' | |
- uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true |