-
I'm using https://github.com/nektos/act to test my github actions locally, but im getting permission denied errors when running this action:
I'm using a token to checkout the repo ( this token belongs to me when running locally, it definitely has permissions needed for this) - uses: actions/checkout@master
with:
fetch-depth: 2
token: ${{ secrets.GH_TOKEN }} I have a step to add file and and commit it - name: Add test file
run: |
# ...
touch test.yaml
- name: Commit test.yaml
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Commit test.yaml [skip actions]
branch: ${{ github.head_ref }}
file_pattern: '*.yaml' When i push to the repo and the action workflow runs on github, it succeeds so im unsure of what im missing here? Anything stand out or am I missing something? Im an administrator on the repo in question and my token definitely has permissions so im unsure of why this is failing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I haven't used the action with That you use Maybe this is related to As the Action works as expected when run on GitHub Actions and not in Act, I wonder if this is related to how Act communicated with the "outside". |
Beta Was this translation helpful? Give feedback.
Actually looks like i found my culprit.
act
skips aactions/checkout
step by copying the local repo into the container. This prevents theactions/checkout
step from running, therefore preventing the https/config setup to use my token. They have an option to avoid this:--no-skip-checkout Do not skip actions/checkout