-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (34 loc) · 1.02 KB
/
concat.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
name: Concatenate
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: listup-targets
run: |
files=$(find rulesets -type f -print)
escaped_files="${files//$'\n'/\ }"
echo "files=${escaped_files}" >> $GITHUB_OUTPUT
- name: Clear concat file
run: |
rm ruleset.yaml
- name: Concatenate files
uses: ftnext/action-concatenate-files@main
with:
sources: ${{ steps.listup-targets.outputs.files }}
destination: ruleset.yaml
- name: Commit files
run: |
git config --local user.email "2406013+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Add changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}