Skip to content

Container registry not showing the latest pushed image #35965

@thetonk

Description

@thetonk

Description

On my private gitea instance I create docker container images of Python projects using Gitea Actions, using matrix strategy for multi-arch builds. The resulting images are being pushed to the corresponding Gitea Container Registry. Action gets completed successfully and container registry correctly serves the latest pushed image, but the web UI of Gitea still shows the older image. If I delete the older image and run Action again, then web UI shows the correct latest image version. The bug appeared first time on Gitea 1.25.0.

This is the workflow YAML I am using for my builds:

name: build-image-and-push
on:
  push:
    branches:
      - main
jobs:
  gitea-runner:
    strategy:
      matrix:
        os: ["ubuntu-latest","arm64-ubuntu-latest"]
        include:
          - os: ubuntu-latest
            arch: amd64
          - os: arm64-ubuntu-latest
            arch: arm64
    runs-on: ${{ matrix.os }}
    container:
      image: catthehacker/ubuntu:act-latest
    steps:
      - name: checkout
        uses: actions/checkout@v4
      - name: setup buildx
        uses: docker/setup-buildx-action@v3
      - name: add internal registry host entry
        run: |
          sudo echo "${{ secrets.REGISTRY_IP }} gitea.example.com" | sudo tee -a /etc/hosts
      - name: login to Gitea Package Registry
        uses: docker/login-action@v3
        with:
          registry: gitea.example.com
          username: ${{ gitea.repository_owner }}
          password: ${{ secrets.ACCESS_TOKEN }}
      - name: build image ${{ matrix.arch }}
        run: >
          docker buildx build --platform linux/${{ matrix.arch }} --output type=docker
          -t gitea.example.com/user/repo:${{ matrix.arch }}_latest .
      - name: push ${{ matrix.arch }} image
        run: "docker push gitea.example.com/user/repo:${{ matrix.arch }}_latest"
      - run: "echo job status code: ${{ job.status }}"

For registry authentication, I use an access token with the following permissions for all repositories (both private/public):

  • write:organization
  • write:package
  • write:repository

Gitea Action log:
main-gitea-runner (amd64, ubuntu-latest)-253.log

Gitea Version

1.25.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

Gitea container has Git version of 2.49.1

Operating System

Host machine uses Debian Linux 13

How are you running Gitea?

I use the latest tagged docker image for both gitea and gitea-act-runner from Docker Hub. Instance is accessed behind Apache reverse proxy, according to documentation instructions. For database I use bare metal MariaDB 11.8.3, on the same host machine.

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions