diff --git a/.forgejo/workflows/argocd-sync.yaml b/.forgejo/workflows/argocd-sync.yaml index b2ee87c..1bf5be2 100644 --- a/.forgejo/workflows/argocd-sync.yaml +++ b/.forgejo/workflows/argocd-sync.yaml @@ -12,7 +12,11 @@ jobs: runs-on: docker steps: - name: Checkout - uses: actions/checkout@v4 + run: | + CLONE_URL="https://${{ secrets.CI_RUNNER }}:${{ secrets.CI_RUNNER_SECRET }}@${{ gitea.repository_clone_url | replace 'https://', '' }}" + git clone --depth 1 "$CLONE_URL" . + git fetch origin ${{ gitea.ref }}:current-branch + git checkout current-branch - name: Install ArgoCD CLI run: | diff --git a/.forgejo/workflows/security-scan.yaml b/.forgejo/workflows/security-scan.yaml index 7e5ad60..dfbffd9 100644 --- a/.forgejo/workflows/security-scan.yaml +++ b/.forgejo/workflows/security-scan.yaml @@ -16,7 +16,11 @@ jobs: runs-on: docker steps: - name: Checkout - uses: actions/checkout@v4 + run: | + CLONE_URL="https://${{ secrets.CI_RUNNER }}:${{ secrets.CI_RUNNER_SECRET }}@${{ gitea.repository_clone_url | replace 'https://', '' }}" + git clone --depth 1 "$CLONE_URL" . + git fetch origin ${{ gitea.ref }}:current-branch + git checkout current-branch - name: Install Tools run: | diff --git a/.forgejo/workflows/validate-k8s.yaml b/.forgejo/workflows/validate-k8s.yaml index 670363e..f346a6b 100644 --- a/.forgejo/workflows/validate-k8s.yaml +++ b/.forgejo/workflows/validate-k8s.yaml @@ -18,7 +18,11 @@ jobs: runs-on: docker steps: - name: Checkout - uses: actions/checkout@v4 + run: | + CLONE_URL="https://${{ secrets.CI_RUNNER }}:${{ secrets.CI_RUNNER_SECRET }}@${{ gitea.repository_clone_url | replace 'https://', '' }}" + git clone --depth 1 "$CLONE_URL" . + git fetch origin ${{ gitea.ref }}:current-branch + git checkout current-branch - name: Install Tools run: |