-
Notifications
You must be signed in to change notification settings - Fork 96
39 lines (33 loc) · 1.14 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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