1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-15 10:58:09 +00:00
trezor-firmware/.github/workflows/bot-common-sync.yml

44 lines
1.3 KiB
YAML
Raw Normal View History

name: "[Bot] sync to trezor-common repository"
on:
schedule:
- cron: "0 0 * * *"
2024-09-05 14:11:02 +00:00
workflow_dispatch:
permissions:
contents: read
jobs:
sync-common:
runs-on: ubuntu-latest
2024-09-05 14:11:02 +00:00
env:
2024-09-06 07:24:04 +00:00
BOT_TOKEN: ${{ secrets.BOT_TOKEN_COMMON_FINE }}
BOT_USERNAME: ${{ secrets.TREZOR_BOT_USERNAME }}
BOT_EMAIL: ${{ secrets.TREZOR_BOT_EMAIL }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
2024-09-05 14:11:02 +00:00
- name: Copy git-filter and script to temporary directory
run: |
2024-09-06 07:24:04 +00:00
cp ./ci/common_sync/common_repo_sync.sh ${{runner.temp}}/common_repo_sync.sh
cp ./ci/common_sync/git-filter-repo ${{runner.temp}}/git-filter-repo
2024-09-05 14:11:02 +00:00
2024-09-06 07:24:04 +00:00
- name: Confiugre git user
2024-09-05 14:11:02 +00:00
run: |
2024-09-06 07:24:04 +00:00
git config --global user.name "${BOT_USERNAME}"
git config --global user.email "${BOT_EMAIL}"
2024-09-05 14:11:02 +00:00
2024-09-06 07:24:04 +00:00
- name: Add git-filter-repo to PATH
2024-09-05 14:11:02 +00:00
run: |
2024-09-06 07:24:04 +00:00
echo "Adding git-filter-repo to PATH"
echo '${{runner.temp}}' >> $GITHUB_PATH
2024-09-05 14:11:02 +00:00
- name: Sync trezor-common repository
run: |
echo "Synchronizing common with the trezor-common repository"
2024-09-06 07:24:04 +00:00
git config --unset-all http.https://github.com/.extraheader
${{ runner.temp }}/common_repo_sync.sh