-
Notifications
You must be signed in to change notification settings - Fork 104
34 lines (31 loc) · 947 Bytes
/
docgen.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
name: Auto Release
on:
push:
branches:
- main
jobs:
build:
name: Readme generation
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: sudo apt-get update && sudo apt-get install libimage-exiftool-perl
- name: Build
run: |
./.github/docgen.py
- name: Commit
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
COMMIT_MSG: |
[README] Generated readmes.
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add .
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})