Replies: 14 comments 1 reply
-
is it resolved? @dbeilin |
Beta Was this translation helpful? Give feedback.
-
I'm having the same problem, not resolved. |
Beta Was this translation helpful? Give feedback.
-
Actually I found this doc: https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow
Using inherit worked for me. |
Beta Was this translation helpful? Give feedback.
-
on:
workflow_call:
inputs:
build-args:
type: string
default: ''
steps:
# ... etc ...
- uses: "docker/build-push-action@v5"
with:
build-args:
SOMETHING=${{ secrets.SOME_SHARED_TOKEN }}
${{ inputs.build-args }} Then you might want to add a build-time secret in from the a calling repo. This secret could be a repo-specific thing so you don't want to image-build:
uses: "path/to/my/workflow.yml@master"
with:
build-args: |
FOO=${{ secrets.foo }}
BAR=${{ secrets.bar }} You can't seem to access any context within |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Is this going to be addressed somehow? |
Beta Was this translation helpful? Give feedback.
-
When you don't want to use the inherit keyword, you need to set each secret in the reusable workflow workflow_call trigger configuration, and share each secret from the main workflow (calling the reusable) as secrets inputs. |
Beta Was this translation helpful? Give feedback.
-
It used to work well for same repo reusable workflow without having to specify any |
Beta Was this translation helpful? Give feedback.
-
I found solution for this problem. secrets are not recognised in the So, this will throw an error
but this will work
|
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Is there any solution to this problem? |
Beta Was this translation helpful? Give feedback.
-
I have similar problem: |
Beta Was this translation helpful? Give feedback.
-
Any news guys? |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I'm running Github Actions within my organization's repos. I created a reusable workflow that I apply to multiple repos.
Here is a snippet from the reusable workflow:
I want to specifically focus on the
Post Build Custom Command
task. I created it specially for a certain repo, which had a lot of similar parts as the reusable workflow, but I had to create this "custom command" input to run a bash script which is custom to that repo.In my caller repo, I call the reusable workflow as so:
With the above structure, I'm getting the following error when the actions are triggered:
I assume it's not possible to use a repo's secrets when I'm using a reusable workflow.
What are my alternatives if I want to keep using the reusable workflow in this repo?
Beta Was this translation helpful? Give feedback.
All reactions