forked from adewg/ICAR
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.29 KB
/
schema_bundle.yml
File metadata and controls
44 lines (36 loc) · 1.29 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
name: Bundle JSON Schemas
on:
push:
branches:
- ADE-1
jobs:
bundle-schemas:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
# Run the Shell script to bundle schemas
- name: Run schema bundling script
run: |
./scripts/schema_bundle_github.sh
- name: Output results
run: |
echo "Bundled schemas are saved in the './bundled-schemes' directory."
echo "Current contents of the 'bundled-schemes' directory:"
ls -lh ./bundled-schemes
# Commit the schemas to the bundled-schemes in the current branch
- name: Commit bundled schemas
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add -f ./bundled-schemes # Force is needed because the folder is ignored in .gitignore file
git commit -m "Update bundled schemas [skip ci]" || echo "No changes to commit"
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} HEAD:${{ github.ref }}