I feel like this should be possible but I just can’t get this to work. I want to create a reusable workflow in a repo. In the SAME organization, I want to use that workflow by passing custom input. I’m using Gitea 1.25.3 and act_runner 0.2.13. I’m running act_runner on a host (not in a Docker container). I’ve verified that act_runner is working just fine with a simple workflow from one repo.
From the repo that contains the reusable workflow (myorg/workflows/.gitea/workflows/test.yml):
name: Greet User
on:
workflow_call:
inputs:
USERNAME:
description: 'Users name'
required: true
type: string
jobs:
greet:
runs-on: my-runner
name: Greet the user
steps:
- name: ASDF
run: |
echo ${{ inputs.USERNAME }}
From the calling repo (myorg/test/.gitea/workflows/test.yml):
name: Testing
on:
workflow_dispatch: {}
jobs:
greet-user:
uses: myorg/workflows/.gitea/workflows/test.yml@main
with:
USERNAME: "my user id"
The error I’m getting:
HOSTNAME(version:v0.2.13) received task 143 of job greet-user, be triggered by event: workflow_dispatch
workflow prepared
evaluating expression 'success()'
expression 'success()' evaluated to 'true'
☁ git clone 'https://my.gitea.instance/myorg/workflows' # ref=main
cloning https://my.gitea.instance/myorg/workflows to /path/to/gitea-runner/act/myorg-workflows@main
Unable to clone https://my.gitea.instance/myorg/workflows refs/heads/main: authentication required: Unauthorized
authentication required: Unauthorized\n
My org is “Limited“ and my two repos are not private. I spent some time searching this forum, issues and pull requests in github and gitea. I even tried using a PAT in the URL. I’ve seen some others have success with this:
uses: https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflows/.gitea/workflows/test.yml@main
This resulted in another error:
HOSTNAME(version:v0.2.13) received task 153 of job greet-user, be triggered by event: workflow_dispatch
workflow prepared
evaluating expression 'success()'
expression 'success()' evaluated to 'true'
☁ git clone 'https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflows' # ref=main
cloning https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflows to /path/to/gitea-runner/act/myorg-workflows@main
Unable to clone https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflows refs/heads/main: parse "https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflowse": net/url: invalid userinfo
parse "https://${{ secrets.MY_PAT }}:@my.gitea.instance/myorg/workflows": net/url: invalid userinfo
I’m out of ideas. Any help would be appreciated. Thanks!