mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
Enforcing usage of fine-grained token means that a token always have an expiration date. Thus it must be update fromp time to time. The seldom SYNC_DEST_REPO secrets would have contained such fine grained token. By spliting this seldom secret and using CONCRETE_ACTIONS_TOKEN there is no need to update SYNC_DEST_REPO each time the token is updated.
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
# Sync repos
|
|
name: Sync repos
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync-repo:
|
|
if: ${{ github.repository == 'zama-ai/tfhe-rs' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Save repo
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
|
|
with:
|
|
name: repo-archive
|
|
path: '.'
|
|
- name: git-sync
|
|
uses: wei/git-sync@55c6b63b4f21607da0e9877ca9b4d11a29fc6d83
|
|
with:
|
|
source_repo: "zama-ai/tfhe-rs"
|
|
source_branch: "main"
|
|
destination_repo: "https://${{ secrets.BOT_USERNAME }}:${{ secrets.CONCRETE_ACTIONS_TOKEN }}@github.com/${{ secrets.SYNC_DEST_REPO }}"
|
|
destination_branch: "main"
|
|
- name: git-sync tags
|
|
uses: wei/git-sync@55c6b63b4f21607da0e9877ca9b4d11a29fc6d83
|
|
with:
|
|
source_repo: "zama-ai/tfhe-rs"
|
|
source_branch: "refs/tags/*"
|
|
destination_repo: "https://${{ secrets.BOT_USERNAME }}:${{ secrets.CONCRETE_ACTIONS_TOKEN }}@github.com/${{ secrets.SYNC_DEST_REPO }}"
|
|
destination_branch: "refs/tags/*"
|