name: Sync Configuration Files on: workflow_dispatch: # manual trigger repository_dispatch: types: [sync-configuration] jobs: sync: runs-on: ubuntu-latest permissions: contents: write pull-requests: write repository-projects: write 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/ - name: Set up Git for commit signing run: | git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" git config --global commit.gpgSign true git config --global user.signingkey ${{ secrets.GITHUB_TOKEN }} - name: Commit and push changes run: | cd openpanel git add . git commit -m "Sync configuration from stefanpejcic/OpenPanel-configuration" git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}