diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 951bea9..0fe999e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,13 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + run: | + git config --global --add safe.directory /workspace/A301/a301_client + git init + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git + git fetch --depth=1 origin $GITHUB_SHA + git checkout $GITHUB_SHA - name: Setup Node.js run: | @@ -41,7 +47,13 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + run: | + git config --global --add safe.directory /workspace/A301/a301_client + git init + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git + git fetch --depth=1 origin $GITHUB_SHA + git checkout $GITHUB_SHA - name: Login to Gitea Registry run: echo "${{ secrets.GITEA_TOKEN }}" | docker login git.tolelom.xyz -u "${{ github.actor }}" --password-stdin