mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-11 17:08:15 +00:00
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: "[Bot] sync to trezor-common repository"
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync-common:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
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
|
|
|
|
- name: Copy git-filter and script to temporary directory
|
|
run: |
|
|
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
|
|
|
|
- name: Confiugre git user
|
|
run: |
|
|
git config --global user.name "${BOT_USERNAME}"
|
|
git config --global user.email "${BOT_EMAIL}"
|
|
|
|
- name: Add git-filter-repo to PATH
|
|
run: |
|
|
echo "Adding git-filter-repo to PATH"
|
|
echo '${{runner.temp}}' >> $GITHUB_PATH
|
|
|
|
- name: Sync trezor-common repository
|
|
run: |
|
|
echo "Synchronizing common with the trezor-common repository"
|
|
git config --unset-all http.https://github.com/.extraheader
|
|
${{ runner.temp }}/common_repo_sync.sh
|