8
8
required : true
9
9
default : true
10
10
type : boolean
11
- commitToSite :
11
+ commitToRepos :
12
12
description : ' Commit to opendata.scot'
13
13
required : true
14
14
default : true
31
31
with :
32
32
repository : ' OpenDataScotland/the_od_bods'
33
33
path : ' the_od_bods'
34
+ token : ${{ secrets.REPO_COMMIT_TOKEN }}
34
35
- name : Check out JKAN repo
35
36
uses : actions/checkout@v3
36
37
with :
@@ -72,12 +73,12 @@ jobs:
72
73
# USMART portals
73
74
- name : Run Script usmart.py
74
75
run : python ./usmart.py
75
- working-directory : ${{env.odbodsPath}}
76
-
76
+ working-directory : ${{env.odbodsPath}}
77
+
77
78
- name : Run Script ckan.py
78
79
run : python ./ckan.py
79
80
working-directory : ${{env.odbodsPath}}
80
-
81
+
81
82
# ScotGov Statistics Sparkql
82
83
- name : Run Script sparkql_statistics.py
83
84
run : python ./sparkql_statistics.py
@@ -102,12 +103,12 @@ jobs:
102
103
- name : Run Script moray_council_scraper.py
103
104
run : python ./moray_council_scraper.py
104
105
working-directory : ${{env.odbodsPath}}/web-scrapers
105
-
106
+
106
107
# National Library of Scotland feeds
107
108
- name : Run Script nls_scraper.py
108
109
run : python ./nls_scraper.py
109
110
working-directory : ${{env.odbodsPath}}/web-scrapers
110
-
111
+
111
112
# Merge data
112
113
- name : Run Script merge_data.py
113
114
run : python ./merge_data.py
@@ -122,15 +123,22 @@ jobs:
122
123
- name : Git config
123
124
working-directory : ${{env.jkanPath}}
124
125
run : |
125
- git config user.name "GitHub Actions"
126
- git config user.email "<>"
127
- - name : Git status
126
+ git config --global user.name 'github-actions[bot]'
127
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
128
+ - name : Git status JKAN
128
129
run : git status
129
130
working-directory : ${{env.jkanPath}}
130
- - name : Commit and push
131
- if : ${{ github.event.inputs.commitToSite == 'true' || github.event.schedule == '0 12 * * FRI' }}
132
- run : git add -A && git commit -m " Dataset Sync" && git push origin gh-pages
131
+ - name : Commit and push JKAN
132
+ if : ${{ github.event.inputs.commitToRepos == 'true' || github.event.schedule == '0 12 * * FRI' }}
133
+ run : git add -A && git commit -m ' Dataset Sync' && git push origin gh-pages
133
134
working-directory : ${{env.jkanPath}}
135
+ - name : Git status the_od_bods
136
+ run : git status
137
+ working-directory : ${{env.odbodsPath}}
138
+ - name : Commit and push the_od_bods
139
+ if : ${{ github.event.inputs.commitToRepos == 'true' || github.event.schedule == '0 12 * * FRI' }}
140
+ run : git add data && git commit -m "Dataset Sync" && git push origin main
141
+ working-directory : ${{env.odbodsPath}}
134
142
135
143
# Tell the Slack channel!
136
144
- name : Slack Notification
@@ -149,7 +157,7 @@ jobs:
149
157
150
158
# Debugging: artifact upload if the workflow fails at all or if we're not committing to the site (likely to debug)
151
159
- uses : actions/upload-artifact@v3
152
- if : ${{ failure() || github.event.inputs.commitToSite == 'false' }}
160
+ if : ${{ failure() || github.event.inputs.commitToRepos == 'false' }}
153
161
with :
154
162
name : workspace
155
163
path : ${{ github.workspace }}
0 commit comments