@@ -4,9 +4,9 @@ name: transform-xml-to-json
4
4
# events but only for the master branch
5
5
on :
6
6
push :
7
- branches : [ main ]
7
+ branches : [main]
8
8
pull_request :
9
- branches : [ main ]
9
+ branches : [main]
10
10
11
11
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12
12
jobs :
@@ -18,51 +18,51 @@ jobs:
18
18
matrix :
19
19
os : [ubuntu-latest]
20
20
include :
21
- - os : ubuntu-latest
22
- PLATFORM : Linux-x86_64
21
+ - os : ubuntu-latest
22
+ PLATFORM : Linux-x86_64
23
23
# - os: ubuntu-latest
24
24
# PLATFORM: Linux-x86_64
25
25
26
26
# Steps represent a sequence of tasks that will be executed as part of the job
27
27
steps :
28
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29
- - uses : actions/checkout@v2
28
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29
+ - uses : actions/checkout@v2
30
30
31
- - name : Setup node and its dependencies
32
- shell : bash -l {0}
33
- run : |
34
- export NVM_VERSION=0.39.0
35
- export NODE_VERSION=18.17 .0
36
- export NPM_VERSION=8.5.5
37
- export NVM_DIR="$HOME/.nvm"
38
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
39
- echo "Setting up the variables to run nvm"
40
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
41
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
42
- echo "Installing the correct node version"
43
- nvm install $NODE_VERSION
44
- echo "Check the version of npm"
45
- CURR_NPM_VERSION=`npm --version`
46
- if [ $CURR_NPM_VERSION != $NPM_VERSION ];
47
- then
48
- echo "Invalid npm version, expected $NPM_VERSION, got $CURR_NPM_VERSION"
49
- npm install npm@$NPM_VERSION
50
- fi
51
- npm install -g npm@6.14
52
- npm install enketo-transformer
53
- npm install libxslt
31
+ - name : Setup node and its dependencies
32
+ shell : bash -l {0}
33
+ run : |
34
+ export NVM_VERSION=0.39.0
35
+ export NODE_VERSION=22.13 .0
36
+ export NPM_VERSION=11.0.0
37
+ export NVM_DIR="$HOME/.nvm"
38
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
39
+ echo "Setting up the variables to run nvm"
40
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
41
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
42
+ echo "Installing the correct node version"
43
+ nvm install $NODE_VERSION
44
+ echo "Check the version of npm"
45
+ CURR_NPM_VERSION=`npm --version`
46
+ if [ $CURR_NPM_VERSION != $NPM_VERSION ];
47
+ then
48
+ echo "Invalid npm version, expected $NPM_VERSION, got $CURR_NPM_VERSION"
49
+ npm install npm@$NPM_VERSION
50
+ fi
51
+ npm install -g npm@11.0.0
52
+ npm install enketo-transformer
53
+ npm install libxslt
54
54
55
- - name : Run the transformer script
56
- shell : bash -l {0}
57
- run : |
58
- node .
59
- pwd
60
- ls -lha
61
-
62
- - name : Commit
63
- run : |
64
- git config --global user.name 'GitHub Action'
65
- git config --global user.email 'action@github.com'
66
- git add data-json
67
- git commit --no-verify -m 'Update data-json' || echo "No changes to commit"
68
- git push || echo "No changes to commit"
55
+ - name : Run the transformer script
56
+ shell : bash -l {0}
57
+ run : |
58
+ node .
59
+ pwd
60
+ ls -lha
61
+
62
+ - name : Commit
63
+ run : |
64
+ git config --global user.name 'GitHub Action'
65
+ git config --global user.email 'action@github.com'
66
+ git add data-json
67
+ git commit --no-verify -m 'Update data-json' || echo "No changes to commit"
68
+ git push || echo "No changes to commit"
0 commit comments