Gitea action artifacts 404 #13670

Closed
opened 2025-11-02 10:49:48 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @stuzer05 on GitHub (Nov 3, 2024).

Description

I use appleboy/ssh-action@v0.1.4 to dump prod database and want to import it in actions mariadb instance, here is my workflow

name: test

on:
    - push

jobs:
    migrations:
        runs-on: ubuntu-latest
        container:
            image: cimg/php:8.3-node
            env:
                RUNNER_TOOL_CACHE: /toolcache
                DB_CONNECTION: mysql
                DB_DATABASE: laravel-migrations
                DB_USERNAME: root
                DB_PASSWORD: root

        services:
            mysql:
                image: mysql:latest
                ports:
                    - 3306/tcp
                env:
                    MYSQL_DATABASE: laravel-migrations
                    MYSQL_ROOT_PASSWORD: root
                options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

        steps:
            - uses: actions/checkout@v3
              with:
                  submodules: "true"
                  token: ${{ secrets.GIT_TOKEN }}

            - run: cp .env.ci .env

            - uses: actions/setup-go@v3
              with:
                  go-version: '1.23'

            - uses: seepine/hash-files@v1
              id: get-hash
              with:
                  patterns: composer.lock

            - uses: actions/cache@v4
              with:
                  path: vendor
                  key: ${{ runner.os }}-composer-${{ steps.get-hash.outputs.hash }}

            - run: composer install --no-progress --prefer-dist --optimize-autoloader
            - run: php artisan key:generate

            - name: Dump production database
              uses: appleboy/ssh-action@v0.1.4
              with:
                  host: ${{ secrets.PROD_SSH_HOST }}
                  username: ${{ secrets.PROD_SSH_USER }}
                  key: ${{ secrets.PROD_SSH_KEY }}
                  script: |
                    docker exec mariadb mysqldump -h ${{ secrets.PROD_DB_HOST }} -u ${{ secrets.PROD_DB_USER }} -p${{ secrets.PROD_DB_PASSWORD }} ${{ secrets.PROD_DB_DATABASE }} > /var/lib/mysql/gitea_actions_db_dump.sql
                    cat /var/lib/docker/volumes/mariadb-data/gitea_actions_db_dump.sql | gzip > gitea_actions_db_dump.sql

            - name: Download database dump
              uses: actions/download-artifact@v3
              with:
                  name: gitea_actions_db_dump
                  path: ./

            - name: Restore database dump to actions
              run: |
                  gunzip -c gitea_actions_db_dump.sql | mysql -h 127.0.0.1 -uroot -proot laravel-migrations

            - run: php artisan migrate

actions/download-artifact@v3 crashes with

Starting download for db_dump
List Artifacts - Error is not retryable
##### Begin Diagnostic HTTP information #####
Status Code: 404
Status Message: Not Found
Header Information: {
  "server": "openresty",
  "date": "Sun, 03 Nov [2](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-2)024 09:41:41 GMT",
  "content-type": "text/plain; charset=utf-8",
  "content-length": "10",
  "connection": "keep-alive",
  "x-content-type-options": "nosniff"
}
###### End Diagnostic HTTP information ######
##### Begin Diagnostic HTTP information #####
Status Code: 404
Status Message: Not Found
Header Information: {
  "server": "openresty",
  "date": "Sun, 0[3](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-3) Nov 2024 09:41:41 GMT",
  "content-type": "text/plain; charset=utf-8",
  "content-length": "10",
  "connection": "keep-alive",
  "x-content-type-options": "nosniff"
}
###### End Diagnostic HTTP information ######
::error::List Artifacts failed: Artifact service responded with [4](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-4)04

gitea uses local storage ini config


and I alse get

EACCES: permission denied, mkdir '/toolcache'in actions/setup-go@v3 step

what could be the problem?

Gitea Version

1.23.0+dev-613-g259811617b

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

PostgreSQL

Originally created by @stuzer05 on GitHub (Nov 3, 2024). ### Description I use `appleboy/ssh-action@v0.1.4` to dump prod database and want to import it in actions mariadb instance, here is my workflow ```yaml name: test on: - push jobs: migrations: runs-on: ubuntu-latest container: image: cimg/php:8.3-node env: RUNNER_TOOL_CACHE: /toolcache DB_CONNECTION: mysql DB_DATABASE: laravel-migrations DB_USERNAME: root DB_PASSWORD: root services: mysql: image: mysql:latest ports: - 3306/tcp env: MYSQL_DATABASE: laravel-migrations MYSQL_ROOT_PASSWORD: root options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v3 with: submodules: "true" token: ${{ secrets.GIT_TOKEN }} - run: cp .env.ci .env - uses: actions/setup-go@v3 with: go-version: '1.23' - uses: seepine/hash-files@v1 id: get-hash with: patterns: composer.lock - uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-composer-${{ steps.get-hash.outputs.hash }} - run: composer install --no-progress --prefer-dist --optimize-autoloader - run: php artisan key:generate - name: Dump production database uses: appleboy/ssh-action@v0.1.4 with: host: ${{ secrets.PROD_SSH_HOST }} username: ${{ secrets.PROD_SSH_USER }} key: ${{ secrets.PROD_SSH_KEY }} script: | docker exec mariadb mysqldump -h ${{ secrets.PROD_DB_HOST }} -u ${{ secrets.PROD_DB_USER }} -p${{ secrets.PROD_DB_PASSWORD }} ${{ secrets.PROD_DB_DATABASE }} > /var/lib/mysql/gitea_actions_db_dump.sql cat /var/lib/docker/volumes/mariadb-data/gitea_actions_db_dump.sql | gzip > gitea_actions_db_dump.sql - name: Download database dump uses: actions/download-artifact@v3 with: name: gitea_actions_db_dump path: ./ - name: Restore database dump to actions run: | gunzip -c gitea_actions_db_dump.sql | mysql -h 127.0.0.1 -uroot -proot laravel-migrations - run: php artisan migrate ``` `actions/download-artifact@v3` crashes with ```log Starting download for db_dump List Artifacts - Error is not retryable ##### Begin Diagnostic HTTP information ##### Status Code: 404 Status Message: Not Found Header Information: { "server": "openresty", "date": "Sun, 03 Nov [2](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-2)024 09:41:41 GMT", "content-type": "text/plain; charset=utf-8", "content-length": "10", "connection": "keep-alive", "x-content-type-options": "nosniff" } ###### End Diagnostic HTTP information ###### ##### Begin Diagnostic HTTP information ##### Status Code: 404 Status Message: Not Found Header Information: { "server": "openresty", "date": "Sun, 0[3](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-3) Nov 2024 09:41:41 GMT", "content-type": "text/plain; charset=utf-8", "content-length": "10", "connection": "keep-alive", "x-content-type-options": "nosniff" } ###### End Diagnostic HTTP information ###### ::error::List Artifacts failed: Artifact service responded with [4](https://gitea.stuzer.link/Euroline/b2b.euroline.ltd/actions/runs/173#jobstep-7-4)04 ``` gitea uses `local` storage ini config --- and I alse get `EACCES: permission denied, mkdir '/toolcache'`in `actions/setup-go@v3` step what could be the problem? ### Gitea Version 1.23.0+dev-613-g259811617b ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:49:48 -06:00
Author
Owner

@stuzer05 commented on GitHub (Nov 3, 2024):

Found the issue

@stuzer05 commented on GitHub (Nov 3, 2024): Found the issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13670