-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for GitHub Token #94
Comments
@ChristopherHX When I run the following command in Git Bash it works, but it fails using Command Prompt. When I run Command: act --workflows ".github/workflows/release.yaml" --secret GITHUB_TOKEN="$(gh auth token)" Workflow: name: Create GitHub Release
on:
workflow_dispatch:
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false Output: time="2025-02-08T15:32:13-05:00" level=info msg="Using docker host 'npipe:////./pipe/docker_engine', and daemon socket 'npipe:////./pipe/docker_engine'"
[Create GitHub Release/Create Release] 🚀 Start image=catthehacker/ubuntu:act-latest
[Create GitHub Release/Create Release] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Create GitHub Release/Create Release] using DockerAuthConfig authentication for docker pull
[Create GitHub Release/Create Release] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Create GitHub Release/Create Release] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Create GitHub Release/Create Release] 🐳 docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
[Create GitHub Release/Create Release] ☁ git clone 'https://github.com/actions/create-release' # ref=v1
[Create GitHub Release/Create Release] Cleaning up container for job Create Release
[Create GitHub Release/Create Release] 🏁 Job succeeded
Error: authentication required |
To implement better support for GitHub Token. I am thinking to always show In terms of generating a value, the user can:
@ChristopherHX What do you think? |
I still think this is a security bug called script injection, cmd does not support YMMV, I think nektos/act#2651 is the way to go. (yes I just opened this as a backport to nektos)
You can just call this command before act, capture it's output and pass the secret to act without saving it. (.. and without having act doing it for your extension) Only thing I failed was getting the ghes hostname for the auth token, without parsing the unfriendly output of
The first thing what came into my mind was, why doesn't the + button allow me to add an item to the list? Creating a secret file was not expected from my side / creating a file should have a (new if it is not already created) file button/ or not? Otherwise yes a valid workaround |
The GITHUB_TOKEN secret could also have an addition icon that it's value is auto generated by |
https://nektosact.com/usage/index.html#github_token
The text was updated successfully, but these errors were encountered: