-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 857 Bytes
/
main.yml
File metadata and controls
38 lines (29 loc) · 857 Bytes
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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
validate-sctipts:
# bash -n scriptname
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check syntax
run: for script in $(ls scripts/*.sh); do bash -n $script; done
generate:
if: "!contains(github.event.head_commit.message, '#regenerate') && github.ref == 'refs/heads/main'"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run generate_index.sh
run: bash ./utils/generate_index.sh
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: 'index.json'
author_name: GitHub Actions
# author_email: mail@example.com