Automatically commit build results to the stm32-data-generated repo.

This commit is contained in:
Dario Nieuwenhuis 2023-07-02 13:32:11 +02:00
parent 9f043c5eab
commit e54c3d70de

23
.github/ci/generated.sh vendored Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
## on push branch=main
## permission contents write
## permission_repo stm32-data-generated
set -euxo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
git clone https://github.com/embassy-rs/stm32-data-generated/ build
./d ci
COMMIT=$(git rev-parse HEAD)
cd build
git add data stm32-metapac
git commit -m "Generated from stm32-data $COMMIT"
git tag -a stm32-data-$COMMIT -m "Generated from stm32-data $COMMIT"
git push --follow-tags