Update imports #762
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |