Skip to content

Add support for latest in Run-URL #27911

Closed
@JOKUE2002

Description

@JOKUE2002

Description

Whilst trying to access the latest run of my action, I noticed, that the URL https://my-gitea.tld/user/repo/actions/runs/latest would always point to the run with the ID 0 (like https://my-gitea.tld/user/repo/actions/runs/0). This would also work with any other word (e.g. 'hello', 'world', 'anything', ...) instead of latest.

Would love to see "latest" to point to the newest run (run w/ highest ID) and any other word to point nowhere.

Couldn't reproduce on try.gitea.io because I have no action-runner I can access or repurpose available

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.42.0

Operating System

Ubuntu 16.04.7 LTS

How are you running Gitea?

Downloaded binary with a systemctl service

Database

SQLite

Activity

KN4CK3R

KN4CK3R commented on Nov 5, 2023

@KN4CK3R
Member

The parameter behind /run/ is supposed to be a number and a failed number conversion just results in 0. This should be a proposal.

added
type/proposalThe new feature has not been accepted yet but needs to be discussed first.
and removed on Nov 5, 2023
changed the title [-]Run-URL can be anything to display run with ID 0[/-] [+]Add support for `latest` in Run-URL[/+] on Nov 5, 2023
fuxiaohei

fuxiaohei commented on Nov 14, 2023

@fuxiaohei
Contributor

In Github Actions. The latest is not supported. For example in Gitea repo, I get runs link https://github.com/go-gitea/gitea/actions/runs/6863940854, but https://github.com/go-gitea/gitea/actions/runs/latest is 404.

There is another problem.
https://github.com/go-gitea/gitea/actions/runs/6863940854 is from docker-dryrun workflow.
But previous one https://github.com/go-gitea/gitea/actions/runs/6863940853 is from db-tests workflow.
The latest run can be from any workflow. Should we provide latest in this case ?

dosenpils

dosenpils commented on Aug 6, 2024

@dosenpils

I am wondering why it is working on this [0] gitea server. If you look into the README.md of the mentioned repo you can see that the mainainer is using the link with latest as a tag. By following the link you always get to the latest run.

As @JOKUE2002 stated here, this is not a Gitea server, but a Forgejo server.

[0] https://git.madhouse-project.org/algernon/chronicles.mad-scientist.club

JOKUE2002

JOKUE2002 commented on Aug 6, 2024

@JOKUE2002
Author

I am wondering why it is working on this [0] gitea server.

For starters it appears to be a forgejo server...

But would still love to see this in gitea.
If you for example have a repository with a single workflow (e.g. building a node project), getting the latest would make deployment using gitea more simple than before.

dosenpils

dosenpils commented on Aug 6, 2024

@dosenpils

Oh you're right. I just saw the UI and assumed that it is a gitea server. But after your comment I looked again and scrolled down a bit: "Powered by Forgejo"

But I agree with you: I'd also love to see this feature in gitea.

self-assigned this
on Aug 9, 2024
added this to the 1.23.0 milestone on Aug 9, 2024
added a commit that references this issue on Aug 10, 2024
lunny

lunny commented on Sep 6, 2024

@lunny
Member

Resolved by #31808

locked as resolved and limited conversation to collaborators on Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

topic/gitea-actionsrelated to the actions of Giteatype/proposalThe new feature has not been accepted yet but needs to be discussed first.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @lunny@KN4CK3R@fuxiaohei@dosenpils@JOKUE2002

      Issue actions

        Add support for `latest` in Run-URL · Issue #27911 · go-gitea/gitea