diff --git a/.gitea/workflows/homelab-main.yml b/.gitea/workflows/homelab-main.yml index 4b29419..ef481fb 100644 --- a/.gitea/workflows/homelab-main.yml +++ b/.gitea/workflows/homelab-main.yml @@ -12,16 +12,9 @@ jobs: steps: - name: Check out repository - run: | - set -euo pipefail - - find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} + - git init - git remote add origin ssh://git@192.168.100.73:32222/jv/my-homelab-configs.git - git fetch --prune origin +refs/heads/main:refs/remotes/origin/main +refs/heads/dev:refs/remotes/origin/dev +refs/tags/*:refs/tags/* - git checkout --force "${{ gitea.sha }}" - git config --global --add safe.directory "$PWD" - + uses: actions/checkout@v4 + with: + ref: ${{ gitea.sha }} - name: Validate repository run: | set -euo pipefail @@ -36,16 +29,9 @@ jobs: steps: - name: Check out repository - run: | - set -euo pipefail - - find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} + - git init - git remote add origin ssh://git@192.168.100.73:32222/jv/my-homelab-configs.git - git fetch --prune origin +refs/heads/main:refs/remotes/origin/main +refs/tags/*:refs/tags/* - git checkout --force "${{ gitea.sha }}" - git config --global --add safe.directory "$PWD" - + uses: actions/checkout@v4 + with: + ref: ${{ gitea.sha }} - name: Block automatic deploy for external Gitea changes run: | set -euo pipefail