Explorar el Código

feat: workflow to update the mirror github repository.

This adds a new script update-mirror that will run every day and is meant
to keep the github repository in sync with the one on crysp.
Michele Orrù hace 10 meses
padre
commit
be8adc764c
Se han modificado 2 ficheros con 31 adiciones y 0 borrados
  1. 25 0
      .github/workflows/update-mirror.yml
  2. 6 0
      update-mirror

+ 25 - 0
.github/workflows/update-mirror.yml

@@ -0,0 +1,25 @@
+name: Update Mirror
+
+on:
+  schedule:
+    - cron: '0 0 * * *'  # Runs daily at midnight UTC
+  workflow_dispatch:  # Allows manual trigger
+
+jobs:
+  update-mirror:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          token: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Configure Git
+        run: |
+          git config user.name "github-actions[bot]"
+          git config user.email "github-actions[bot]@users.noreply.github.com"
+
+      - name: Run update mirror script
+        run: ./update-mirror

+ 6 - 0
update-mirror

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -e
+
+git pull https://git-crysp.uwaterloo.ca/SigmaProtocol/sigma-compiler main --tags
+git push origin main --tags