Skip to content

Commit 9d5f69d

Browse files
Add "Recipes" section to README with GitHub Actions workflow examples
1 parent 9fdb4fd commit 9d5f69d

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,54 @@ will be `?foo=asd&bar=zxc`.
172172
Ultimately, the image link will look like this:
173173
`https://banners.beyondco.de/Qwe%20rty/asd-zxc.png?foo=asd&bar=zxc`.
174174

175+
## Recipes
176+
177+
### Update many files
178+
179+
```yaml
180+
# .github/workflows/preview.yml
181+
name: Preview Updater
182+
183+
on:
184+
workflow_dispatch:
185+
186+
permissions:
187+
contents: write
188+
pull-requests: write
189+
190+
jobs:
191+
main:
192+
uses: TheDragonCode/.github/.github/workflows/preview.yml@main
193+
194+
foo:
195+
runs-on: ubuntu-latest
196+
197+
steps:
198+
- uses: actions/checkout@v6
199+
with:
200+
fetch-depth: 0
201+
202+
- name: Update banner
203+
uses: TheDragonCode/github-preview-updater@v2
204+
with:
205+
readme: 'README_foo.md'
206+
config: '.github/preview-updater-foo.yml'
207+
208+
bar:
209+
runs-on: ubuntu-latest
210+
211+
steps:
212+
- uses: actions/checkout@v6
213+
with:
214+
fetch-depth: 0
215+
216+
- name: Update banner
217+
uses: TheDragonCode/github-preview-updater@v2
218+
with:
219+
readme: 'README.bar.md'
220+
config: '.github/preview-updater-bar.yml'
221+
```
222+
175223
## FAQ
176224

177225
> 💥 Preview Updater failed with error: Error when creating a pull request from preview/banner-***: GitHub Actions is not permitted to create or approve pull requests

0 commit comments

Comments
 (0)