-
Notifications
You must be signed in to change notification settings - Fork 17
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
ACTIONS_RUNTIME_URL
/ ACTIONS_RUNTIME_TOKEN
and friends aren't documented
#28
Comments
You didn't know about actions/runner Now, why is act different here?, that's a different topic. |
Err. So, do I need to do something like: act --env MY_ACTIONS_RUNTIME_URL="$ACTIONS_RUNTIME_URL" --env MY_ACTIONS_RUNTIME_TOKEN="$ACTIONS_RUNTIME_TOKEN" and then: steps:
...
- name: use actions runtime stuff
env:
ACTIONS_RUNTIME_URL: ${{ env.MY_ACTIONS_RUNTIME_URL }}
ACTIONS_RUNTIME_TOKEN: ${{ env.MY_ACTIONS_RUNTIME_TOKEN }}
... |
Note: All I want is docs explaining how I, an "end user", can make this work. That's why this is in the docs repo and not in the act repo with a subject of "act is doing this wrong". |
I'm probably too far away from an "end user", here a technical instruction to do it.
Err 500, did you try to diagnose this with act in act? act in Runner.Server is a possible combo to diagnose the missing var, because act and actions/runner do have a lot of different behavior. |
I guess I'm running act in Runner.Server. With your suggestion, it works! Running nektos/act inside GitHub runners (Runner.Server) and allowing access to the GitHub Artifact APIs:Two steps are recommended, one to get the variables (which must not be a For example: steps:
# ... any steps necessary to set up act ...
- name: get actions environment variables
uses: actions/github-script@v7
id: action-variables
with:
script: |
core.setOutput('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL);
core.setOutput('ACTIONS_RUNTIME_URL', process.env.ACTIONS_RUNTIME_URL);
core.setOutput('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN);
- name: run act
env:
GH_TOKEN: ${{ github.token }}
MY_ACTIONS_RESULTS_URL: ${{ steps.action-variables.outputs.ACTIONS_RESULTS_URL }}
MY_ACTIONS_RUNTIME_URL: ${{ steps.action-variables.outputs.ACTIONS_RUNTIME_URL }}
MY_ACTIONS_RUNTIME_TOKEN: ${{ steps.action-variables.outputs.ACTIONS_RUNTIME_TOKEN }}
run: |
act \
-s GH_TOKEN="$GH_TOKEN" \
--env ACTIONS_RESULTS_URL="$MY_ACTIONS_RESULTS_URL" \
--env ACTIONS_RUNTIME_URL="$MY_ACTIONS_RUNTIME_URL" \
--env ACTIONS_RUNTIME_TOKEN="$MY_ACTIONS_RUNTIME_TOKEN" \ |
I'd love to at least know how to pass the GitHub hosted variables to act so that I can perform passthrough action stuffs.
I tried that here:
https://github.com/check-spelling-sandbox/act-use-spell-check-this/actions/runs/10801275723/workflow#L95-L96
But that clearly didn't work as seen in:
https://github.com/check-spelling-sandbox/act-use-spell-check-this/actions/runs/10801275723/job/29961096172#step:11:9536
The text was updated successfully, but these errors were encountered: