-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (146 loc) · 8.9 KB
/
artsdata-export.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Artsdata Export
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *' # Runs daily at 4 AM UTC, which is 11 PM EST
jobs:
deploy:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
AWS_REGION: ca-central-1
WEBHOSTING_BUCKET_NAME: huginn-data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
bundler-cache: true
- run: bundle install
- name: Run pipelines
run: mkdir output ; cd src ; bundle exec ruby batch.rb
- name: Set current date as output
id: version # this is used on variable path
run: echo "dumpdate=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_OUTPUT
- name: Upload to S3
run: aws s3 cp ./output/ s3://${{ env.WEBHOSTING_BUCKET_NAME }}/lavitrine/${{ steps.version.outputs.dumpdate }}/ --acl public-read --recursive
- name: grandtheatre-qc-ca dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "artifact": "grandtheatre-qc-ca",
"comment": "Dump of grandtheatre.qc.ca using Github workflows",
"publisher": "${{ secrets.PUBLISHER_URI_GREGORY }}",
"group": "${{ github.event.repository.name }}",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/derived-grandtheatre-qc-ca.json",
"downloadFile": "derived-grandtheatre-qc-ca.json",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: placedesarts-com dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{ secrets.PUBLISHER_URI_GREGORY }}",
"group": "${{ github.event.repository.name }}",
"artifact": "placedesarts-com",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/placedesarts-com.json",
"downloadFile": "placedesarts-com.json",
"comment": "Dump of placedesarts.com using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: dia-logGraphs dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{ secrets.PUBLISHER_URI_GREGORY }}",
"group": "${{ github.event.repository.name }}",
"artifact": "dia-logGraphs",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/dia-logGraphs.json",
"downloadFile": "dia-logGraphs.json",
"comment": "Dump of dia-log Websites using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: hector-charland-com dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{ secrets.PUBLISHER_URI_GREGORY }}",
"group": "${{ github.event.repository.name }}",
"artifact": "hector-charland-com",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/hector-charland-com.json",
"downloadFile": "hector-charland-com.json",
"comment": "Dump of hector-charland-com Websites using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: theatredumarais-com dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{secrets.PUBLISHER_URI_GREGORY}}",
"group": "${{ github.event.repository.name }}",
"artifact": "theatredumarais-com",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/theatredumarais-com.json",
"downloadFile": "theatredumarais-com.json",
"comment": "Dump of theatredumarais-com Websites using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: signe-laval-cms-events dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{secrets.PUBLISHER_URI_GREGORY}}",
"group": "${{ github.event.repository.name }}",
"artifact": "signe-laval-cms-events",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/signe-laval-cms-events.json",
"downloadFile": "signe-laval-cms-events.json",
"comment": "Dump of signe-laval-cms-events from Footlight CMS using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: tout-culture-cms-events dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{secrets.PUBLISHER_URI_GREGORY}}",
"group": "${{ github.event.repository.name }}",
"artifact": "tout-culture-cms-events",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/tout-culture-cms-events.json",
"downloadFile": "tout-culture-cms-events.json",
"comment": "Dump of tout-culture-cms-events from Footlight CMS using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'
- name: culture-mauricie-cms-events dump # TODO add "reportCallbackUrl" to Github logs
run: |
curl \
-H 'Content-Type: application/json' \
-X POST http://api.artsdata.ca/databus/ \
--data '{ "publisher": "${{secrets.PUBLISHER_URI_GREGORY}}",
"group": "${{ github.event.repository.name }}",
"artifact": "culture-mauricie-cms-events",
"version": "${{ steps.version.outputs.dumpdate }}",
"downloadUrl": "https://${{ env.WEBHOSTING_BUCKET_NAME }}.s3.ca-central-1.amazonaws.com/lavitrine/${{ steps.version.outputs.dumpdate }}/culture-mauricie-cms-events.json",
"downloadFile": "culture-mauricie-cms-events.json",
"comment": "Dump of culture-mauricie-cms-events from Footlight CMS using Github workflows",
"reportCallbackUrl": "https://huginn-staging.herokuapp.com/users/1/web_requests/273/databus",
"register_only": "true"
}'