From f8b19d9f55b704cd9029225f6bf01c317a18cc94 Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:19:23 -0700 Subject: [PATCH] fix(ci): Replace GitHub actions/checkout with Forgejo auth Use CI_RUNNER and CI_RUNNER_SECRET for repo clone authentication. Embed credentials in git clone URL: https://user:token@host/repo.git Removes dependency on GITHUB_TOKEN (GitHub-specific) and improves Forgejo compatibility. --- .forgejo/workflows/argocd-sync.yaml | 6 +++++- .forgejo/workflows/security-scan.yaml | 6 +++++- .forgejo/workflows/validate-k8s.yaml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) 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: |