Skip to content
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

Token from secrets.GITHUB_TOKEN does not work without a permission to write "contents" #47

Open
svetlyak40wt opened this issue Dec 7, 2023 · 0 comments

Comments

@svetlyak40wt
Copy link

svetlyak40wt commented Dec 7, 2023

When using job description from the README:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: butlerlogic/action-autotag@stable
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

I've got "Resource not accessible" error in action logs:

Screenshot 2023-12-07 at 18 37 03

To solve this problem, permissions section should be added tot he job's declaration:

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v3
    - uses: butlerlogic/action-autotag@stable
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant