From e54c3d70de7c1f4b8fd3ad3cb1a33955612ca0a2 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sun, 2 Jul 2023 13:32:11 +0200 Subject: [PATCH] Automatically commit build results to the stm32-data-generated repo. --- .github/ci/generated.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 .github/ci/generated.sh diff --git a/.github/ci/generated.sh b/.github/ci/generated.sh new file mode 100755 index 0000000..098244e --- /dev/null +++ b/.github/ci/generated.sh @@ -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 \ No newline at end of file