-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflow_dispatch use workflow from trigger branch #33098
Conversation
I request feedback, e.g. a new name for Is there a blocker of using a branch specific workflows like discussed in? #33073 This change makes it more like how it is in GitHub Actions. Warning this is the first time I ever touched the code of both htmx and the gitea web ui
See Demos (Updated 4 Jan 2025 (2))
Bildschirmaufnahme.2025-01-04.um.22.49.05.movScreenshot of correctly passed inputs to non default workflow: My test instance just had an |
For reference I used the following workflows both same file: Default branch on: workflow_dispatch
jobs:
_:
runs-on: ubuntu-latest
steps:
- run: ${{ tojson(inputs) }}
shell: cat {0}
Non default branch on:
workflow_dispatch:
inputs:
test-a:
type: boolean
test-b:
type: choice
options:
- a
- b
- c
- d
test-c:
description: One with description!
type: boolean
jobs:
_:
runs-on: windows-latest
steps:
- run: ${{ tojson(inputs) }}
shell: cat {0}
|
60fffe1
to
a6247d4
Compare
* htmx updates the input form on branch switch * add workflow warning to dispatch modal * use name if description of input is empty
a6247d4
to
48af0ff
Compare
* hide submit on workflow not found
I will make some changes |
Feel free to do so :) |
Made some changes (I haven't really tested since I am not sure whether it looks good):
By the way, if you'd like to make the text center-aligned, I think you could just add a |
I looked for coalesce and didn't notice we have a javascript like or 👍
This sounds like what I need.
I technically just copied the html I found when triggering the workflow_dispatch. So now I would change the error depending on CurWorkflowExists and add some new en-us locale definition |
Thank you for confirming, I think I have finished my changes at the moment. |
* fix typo * replace Submit with Run Workflow * add actions.workflow.has_no_workflow_dispatch item
Is there anything need to improve? If no, let's merge. (wait for a while for confirmation) |
I checked again, everything on my TODO list is solved and confirmed this works as expected from my side |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Fix dropdown menu header and mobile view (go-gitea#33108) workflow_dispatch use workflow from trigger branch (go-gitea#33098) [skip ci] Updated translations via Crowdin Trivial fixes (go-gitea#33103) Fix empty git repo handling logic (go-gitea#33101) Refactor legacy line-number and scroll code (go-gitea#33094) Use `Project-URL` metadata field to get a PyPI package's homepage URL (go-gitea#33089) Clean up legacy form CSS styles (go-gitea#33081) [skip ci] Updated translations via Crowdin add myself to maintainers (go-gitea#33088) Make Gitea always use its internal config, ignore `/etc/gitconfig` (go-gitea#33076) Fix "stop time tracking button" on navbar (go-gitea#33084) Fix bleve fuzziness search (go-gitea#33078) Try to fix ACME directory problem (go-gitea#33072) Refactor env var related code (go-gitea#33075)
Closes #33073
Closes #33099