Skip to content

add checkout step #4191

add checkout step

add checkout step #4191

Workflow file for this run

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 }}