-
Notifications
You must be signed in to change notification settings - Fork 27
146 lines (144 loc) · 5.15 KB
/
import.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: Update imports
on:
workflow_dispatch:
schedule:
- cron: "37 11 * * *"
jobs:
import-icalendar:
name: Update iCalendar imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: icalendar
- name: Get dancelist version
run: echo "HEAD=$(git ls-remote https://github.com/qwandor/dancelist HEAD|cut -f1)" >> $GITHUB_OUTPUT
id: version
- name: Cache .cargo and target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-install-${{ steps.version.outputs.HEAD }}
- name: Install dancelist
run: cargo install --git https://github.com/qwandor/dancelist
- name: Import balfolknl
run: dancelist import balfolknl events/netherlands/balfolk_nl.yaml
- name: Import cdss
run: dancelist import cdss events/usa/cdss.yaml
- name: Import contrabridge
run: dancelist import contrabridge events/uk/contrabridge.yaml
- name: Import spreefolk
run: dancelist import spreefolk events/germany/spreefolk.yaml
- name: Import ceilidh-club
run: dancelist import ceilidh-club events/uk/ceilidh_club.yaml
- name: Import bristol-contra
run: dancelist import bristol-contra events/uk/bristol_contra.yaml
- name: Import boulder
run: dancelist import boulder events/usa/boulder.yaml
- name: Import kalender
run: dancelist import kalender events/germany/kalender.yaml
- name: Import lancaster-contra
run: dancelist import lancaster-contra events/uk/lancaster.yaml
- name: Import marburg
run: dancelist import marburg events/germany/marburg.yaml
- name: Import dresden
run: dancelist import dresden events/germany/dresden.yaml
- name: Import freiburg
run: dancelist import freiburg events/germany/freiburg_i_br.yaml
- name: Import skandia
run: dancelist import skandia events/usa/skandia.yaml
- name: Commit if changed
run: |
git add events
git config user.name "Automatic import"
git config user.email "[email protected]"
if git commit -m "Update import."
then
git push
fi
import:
name: Update imports
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- branch: folkbalbende
name: balbende
file: events/belgium/folkbalbende.yaml
- branch: trycontra
name: trycontra
file: events/usa/trycontra.yaml
- branch: webfeet
name: webfeet
file: events/uk/webfeet.yaml
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Get dancelist version
run: echo "HEAD=$(git ls-remote https://github.com/qwandor/dancelist HEAD|cut -f1)" >> $GITHUB_OUTPUT
id: version
- name: Cache .cargo and target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-install-${{ steps.version.outputs.HEAD }}
- name: Install dancelist
run: cargo install --git https://github.com/qwandor/dancelist
- name: Import
run: dancelist import ${{ matrix.name }} ${{ matrix.file }}
- name: Commit if changed
run: |
git add ${{ matrix.file }}
git config user.name "Automatic import"
git config user.email "[email protected]"
if git commit -m "Update import."
then
git push
fi
import-plugevents:
name: Update plug.events imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: plug
- name: Get dancelist version
run: echo "HEAD=$(git ls-remote https://github.com/qwandor/dancelist HEAD|cut -f1)" >> $GITHUB_OUTPUT
id: version
- name: Cache .cargo and target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-install-${{ steps.version.outputs.HEAD }}
- name: Install dancelist
run: cargo install --git https://github.com/qwandor/dancelist
- name: Import balfolk events
run: dancelist import-plug-events ${{ secrets.PLUG_BALFOLK_TOKEN }} plug_balfolk.yaml
- name: Import contra events
run: dancelist import-plug-events ${{ secrets.PLUG_CONTRA_TOKEN }} plug_contra.yaml
- name: Commit if changed
run: |
git add events
git config user.name "Automatic import"
git config user.email "[email protected]"
if git commit -m "Update import."
then
git push
fi