Skip to content

Merge pull request #39 from karan3242/dynamic #74

Merge pull request #39 from karan3242/dynamic

Merge pull request #39 from karan3242/dynamic #74

Workflow file for this run

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