I installed Gitea today, enabled actions, and migrated my repo. When the action runs it always fails during actions/setup-python@v4 with this error:
::group::Installed versions
Version 3.9.2 was not found in the local cache
::error::The version ‘3.9.2’ with architecture ‘x64’ was not found for this operating system.%0AThe list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
I have python installed on the host machine, in the Gitea container and in the Gitea runner container. It probably doesn’t matter but I thought I should mention it.
I tried every single version of Python, nothing changed. Python does exists, I confirmed it by including:
steps:
- run: python3 --version
at the beginning of the steps, it returns Python 3.9.2
Here’s the docker compose:
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.20.5
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- /home/pi/server/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "3012:3000"
- "222:22"
depends_on:
- db
db:
image: postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- ./postgres:/var/lib/postgresql/data
runner:
image: gitea/act_runner:latest
container_name: gitea_runner3
environment:
- CONFIG_FILE=/config.yaml
- GITEA_INSTANCE_URL=http://192.168.1.10:3012
- GITEA_RUNNER_REGISTRATION_TOKEN=N5dYKpDbM3GWgHiqDuWjnqHjllE1nWWJVcJkiySn
- GITEA_RUNNER_NAME
- GITEA_RUNNER_LABELS
- USER_UID=1000
- USER_GID=1000
volumes:
- /home/pi/server/gitea/runner/config.yaml:/config.yaml
- /home/pi/server/gitea:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8088:8088"
And here’s the beginning of the workflow main.yml:
name: Build
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9.2'
I followed the documentation as best as I could, I spent hours on this. Now I give up. I would really appreciate any help.
Why is this happening? How do I fix it?
Mind you, the same script works fine on Github.