add checkout step #4191
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync to Gitea | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| sync: | |
| if: github.repository == 'community-scripts/ProxmoxVED' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set Git identity for actions | |
| run: | | |
| git config --global user.name "Push From Github" | |
| git config --global user.email "[email protected]" | |
| - name: Add Gitea remote | |
| run: git remote add gitea https://$GITEA_USER:[email protected]/community-scripts/ProxmoxVED.git | |
| env: | |
| GITEA_USER: ${{ secrets.GITEA_USERNAME }} | |
| GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} | |
| - name: Pull Gitea changes | |
| run: | | |
| git fetch gitea | |
| git merge --strategy=ours gitea/main | |
| env: | |
| GITEA_USER: ${{ secrets.GITEA_USERNAME }} | |
| GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} | |
| - name: Push to Gitea | |
| run: git push gitea main --force | |
| env: | |
| GITEA_USER: ${{ secrets.GITEA_USERNAME }} | |
| GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} |