go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.15k stars 5.49k forks source link

actions/checkout@v4 - /api/v1/repos/administrator/runner1/tarball/master - Page not found 404 #32481

Open virtualdreams opened 6 days ago

virtualdreams commented 6 days ago

Description

The action actions/checkout@v4 won't work if git not exists in docker container. The action tries to download from an invalid url. The url is also not available in /api/swagger.

Workflow

name: Runner1 Test Checkout
run-name: Runner1 Test Checkout
on: [push]

jobs:
  checkout:
    name: checkout
    runs-on: alpine
    defaults:
      run:
        shell: sh
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          ref: master

Output of act_runner in gitea

Deleting the contents of '/workspace/administrator/runner1'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
404 page not found

Error in log from gitea

GET /api/v1/repos/administrator/runner1/tarball/master for 172.19.0.2:58436, 404 Not Found in 5.7ms @ http/server.go:2188(GlobalNotFound)

If i try to download manually

curl http://gitea.example.org:3000/api/v1/repos/administrator/runner1/tarball/master
404 page not found

Repository is public.

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

On host directly.

Database

MySQL/MariaDB

vcicmanec commented 5 days ago

Facing the same issue, seems to be related to this https://github.com/go-gitea/gitea/issues/29654

lunny commented 4 days ago

Gitea doesn't support the API endpoint /api/v1/repos/<username>/<reponame>/tarball/<branch_name> yet. ref: https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#download-a-repository-archive-tar ref: https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#download-a-repository-archive-zip