forked from TheRenegadeCoder/sample-programs
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 1.99 KB
/
readme.yml
File metadata and controls
75 lines (62 loc) · 1.99 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This workflow generates READMEs for all languages
name: Ronbun
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- 'main'
paths:
- 'archive/**'
- '.glotter.yml'
- 'repo-config.yml'
- '.github/workflows/readme.yml'
- 'pyproject.toml'
- 'poetry.lock'
jobs:
readme:
name: "README Generation"
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: generate-token
with:
app-id: ${{ secrets.README_BOT_APP_ID }}
private-key: ${{ secrets.README_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v6
- name: Read repo config
uses: pietrobolcato/action-read-yaml@1.1.0
id: repo-config
with:
config: repo-config.yml
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ steps.repo-config.outputs['python-version'] }}"
- name: Run Poetry Image
uses: abatilo/actions-poetry@v4
with:
poetry-version: "${{ steps.repo-config.outputs['poetry-version'] }}"
- name: Install Dependencies
run: poetry install
- name: Generate READMEs
run: poetry run ronbun . --log=INFO
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
commit-message: Regenerated READMEs
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: readme-generation
delete-branch: true
title: '[Automated Workflow] Add/Modify READMEs'
labels: enhancement
token: ${{ steps.generate-token.outputs.token }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
token: ${{ steps.generate-token.outputs.token }}