-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (64 loc) · 1.96 KB
/
bikeshed.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
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
76
77
78
79
80
81
82
83
84
85
86
name: Process Bikeshed to HTML
on:
push:
jobs:
changes:
runs-on: ubuntu-20.04
outputs:
changes: ${{ steps.changes.outputs.any_modified }}
steps:
- name: Checkout latest change
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.push.ref }}
- id: branches
name: Get branch names.
uses: tj-actions/branch-names@v8
- id: affected
name: Discover last checked commit
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: ${{ steps.branches.outputs.current_branch }}
error-on-no-successful-workflow: "false"
last-successful-event: "push"
workflow-id: "bikeshed.yml"
- id: changes
name: Check for changed files
uses: tj-actions/changed-files@v42
with:
base_sha: ${{ steps.affected.outputs.base }}
files: |
spec/identity/index.bs
main:
runs-on: ubuntu-20.04
permissions:
contents: write
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
steps:
- name: Checkout latest change
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.push.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Bikeshed
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade bikeshed
bikeshed update
- name: Run Bikeshed
run: |
bikeshed spec spec/identity/index.bs
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: process Bikeshed to HTML (CI)'
file_pattern: 'spec/identity/index.html'
add_options: '-f'
disable_globbing: true
skip_dirty_check: true