2024-08-29 11:11:45 +00:00
|
|
|
name: "[Bot] sync to trezor-common repository"
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
2024-09-05 14:11:02 +00:00
|
|
|
workflow_dispatch:
|
2024-08-29 11:11:45 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-common:
|
|
|
|
runs-on: ubuntu-latest
|
2024-09-05 14:11:02 +00:00
|
|
|
env:
|
|
|
|
GITHUB_BOT_USERNAME: ${{ secrets.TREZOR_BOT_USERNAME }}
|
|
|
|
GITHUB_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
|
|
|
GITHUB_BOT_EMAIL: ${{ secrets.TREZOR_BOT_EMAIL }}
|
2024-08-29 11:11:45 +00:00
|
|
|
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: |
|
|
|
|
cp ./ci/common_sync/git-filter-repo/git-filter-repo ${{runner.temp}}/common_repo_sync.sh
|
|
|
|
cp ./ci/common_sync/git-filter-repo/git-filter-repo ${{runner.temp}}/git-filter-repo
|
|
|
|
|
|
|
|
- name: Add git-filter-repo to PATH
|
|
|
|
run: |
|
|
|
|
echo "Adding git-filter-repo to PATH"
|
|
|
|
echo '${{ runner.temp }}/ci/common_sync/git-filter-repo' >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: Configure git user
|
|
|
|
run: |
|
|
|
|
git config --global user.name $GITHUB_BOT_USERNAME
|
|
|
|
git config --global user.email $GITHUB_BOT_EMAIL
|
|
|
|
|
2024-08-29 11:11:45 +00:00
|
|
|
- name: Sync trezor-common repository
|
|
|
|
run: |
|
|
|
|
echo "Synchronizing common with the trezor-common repository"
|
2024-09-05 14:11:02 +00:00
|
|
|
.${{ runner.temp }}/common_repo_sync.sh
|