GUW sync #13
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: GUW sync | |
on: | |
schedule: | |
# Every midnight but the ones from Fr to Sa and from Sa to Su | |
# Su Mo|Tu|We|Th|Fr|Sa|Su Mo | |
# X X X X X X | |
- cron: '0 0 * * 1-5' # https://crontab.guru/#0_0_*_*_1-5 | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install python deps (GUW) | |
run: | | |
poetry install | |
- name: Set up SSH key | |
run: | | |
set -x | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_KEY_GLIB }}" > ~/.ssh/id_glib | |
echo "${{ secrets.SSH_KEY_GSTREAMER }}" > ~/.ssh/id_gstreamer | |
echo "${{ secrets.SSH_KEY_CERBERO }}" > ~/.ssh/id_cerbero | |
echo "${{ secrets.SSH_KEY_GSTPLUGINSRS }}" > ~/.ssh/id_gstpluginsrs | |
chmod 600 ~/.ssh/id_gstreamer ~/.ssh/id_cerbero ~/.ssh/id_glib ~/.ssh/id_gstpluginsrs | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
ssh -o "IdentitiesOnly=yes" -i ~/.ssh/id_glib -T [email protected] || true | |
ssh -o "IdentitiesOnly=yes" -i ~/.ssh/id_gstreamer -T [email protected] || true | |
ssh -o "IdentitiesOnly=yes" -i ~/.ssh/id_cerbero -T [email protected] || true | |
ssh -o "IdentitiesOnly=yes" -i ~/.ssh/id_gstpluginsrs -T [email protected] || true | |
git config --global protocol.file.allow always | |
git config --global user.email "[email protected]" | |
git config --global user.name "gst.wasm CI" | |
- name: Temporal workaround to access public gitlab repos # TODO handle SSH key | |
run: | | |
sed -i "s#[email protected]:#https://gitlab.freedesktop.org/#g" guw/gstreamer.gst.wasm.toml | |
- name: GUW sync GLib | |
run: | | |
export GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -i ~/.ssh/id_glib" | |
poetry run guw -l debug guw/glib.gst.wasm.toml sync --local | |
- name: GUW sync GStreamer | |
run: | | |
export GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -i ~/.ssh/id_gstreamer" | |
poetry run guw -l debug guw/gstreamer.gst.wasm.toml sync --local | |
- name: GUW sync cerbero | |
run: | | |
export GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -i ~/.ssh/id_cerbero" | |
poetry run guw -l debug guw/cerbero.gst.wasm.toml sync --local |