From 0ae5e1f06a4fc3da7904a99326641df0934d78e2 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Fri, 9 Aug 2024 16:17:16 +0200 Subject: [PATCH] Create sync-configuration.yml --- .github/workflows/sync-configuration.yml | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/sync-configuration.yml diff --git a/.github/workflows/sync-configuration.yml b/.github/workflows/sync-configuration.yml new file mode 100644 index 00000000..83a3e78a --- /dev/null +++ b/.github/workflows/sync-configuration.yml @@ -0,0 +1,34 @@ +name: Sync Configuration Files + +on: + workflow_dispatch: # manual also + repository_dispatch: + types: [sync-configuration] + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout OpenPanel Repository + uses: actions/checkout@v3 + with: + repository: stefanpejcic/OpenPanel + token: ${{ secrets.GITHUB_TOKEN }} + path: openpanel + + - name: Checkout OpenPanel-Configuration Repository + uses: actions/checkout@v3 + with: + repository: stefanpejcic/OpenPanel-configuration + token: ${{ secrets.GITHUB_TOKEN }} + path: configuration-repo + + - name: Sync Configuration Directory + run: | + rsync -av --delete configuration-repo/ openpanel/configuration/ + cd openpanel + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add . + git commit -m "Sync configuration from stefanpejcic/OpenPanel-configuration" + git push origin main