Files
infrastructure/.gitea/workflows/update-repo.yml
Alex Mickelson 040a7e50ce
Some checks failed
Apply Kuberentes Configs / update-repo (push) Failing after 2s
Apply Kuberentes Configs / update-infrastructure (push) Failing after 2s
runs-on
2026-02-07 15:12:47 -07:00

19 lines
691 B
YAML

name: Update Repository
runs-on: home-server
on:
workflow_call:
jobs:
update-repo-folder:
steps:
- name: checkout repo
working-directory: /home/gitea-runner
run: |
if [ -d "infrastructure" ]; then
cd infrastructure
echo "Infrastructure folder exists. Resetting to the most recent commit."
git reset --hard HEAD
git pull https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }} $(git rev-parse --abbrev-ref HEAD)
else
git clone https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }}.git
fi