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

Resource not available by integration #39

Closed
dycw opened this issue Jan 23, 2023 · 5 comments
Closed

Resource not available by integration #39

dycw opened this issue Jan 23, 2023 · 5 comments

Comments

@dycw
Copy link

dycw commented Jan 23, 2023

Issue:

There appears to be an error of the form "resource not available by integration".

Run butlerlogic/action-autotag@1.1.2
  with:
    strategy: regex
    root: src/dummy/__init__.py
    regex_pattern: __version__ = "(?<version>\d+\.\d+\.\d+)"
  env:
    GITHUB_TOKEN: ***
/usr/bin/docker run --name ea425b28648b99bcd842ce8d8d6c7bd7f9e46d_2cfd87 --label ea425b --workdir /github/workspace --rm -e "GITHUB_TOKEN" -e "INPUT_STRATEGY" -e "INPUT_ROOT" -e "INPUT_REGEX_PATTERN" -e "INPUT_PACKAGE_ROOT" -e "INPUT_TAG_PREFIX" -e "INPUT_TAG_SUFFIX" -e "INPUT_TAG_MESSAGE" -e "INPUT_COMMIT_MESSAGE_TEMPLATE" -e "INPUT_VERSION" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/test-autotag/test-autotag":"/github/workspace" ea425b:28648b99bcd842ce8d8d6c7bd7f9e46d
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: Attempting to use regex version extraction strategy.
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: Attempting to create 0.0.4 tag.
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: Resource not accessible by integration
Warning: HttpError: Resource not accessible by integration
    at /app/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Tag.push (file:///app/lib/tag.js:128:22)
    at async run (file:///app/main.js:69:5)
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

How To Reproduce:

Example repo here, where main.yml reads:

name: Create Tag

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: butlerlogic/action-autotag@1.1.2
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
        with:
          strategy: regex
          root: src/dummy/__init__.py
          regex_pattern: '__version__ = "(?<version>\d+\.\d+\.\d+)"'

Expected Behavior:

A tag to be created. More specifically, 0.0.4 since src/dummy/__init__.py reads

__version__ = "0.0.4"
@Svetlanko
Copy link

@dycw you might want to try using stable build instead of 1.1.2:

# replace
- uses: butlerlogic/action-autotag@1.1.2
# with
- uses: butlerlogic/action-autotag@stable

not sure if this will fully fix your issue and a new tag will be created but it possibly will fix HttpError: Resource not accessible by integration.

however,stable build is failing for me with HttpError: Bad credentials #40 . wonder if you are getting the same? 👀

@dycw
Copy link
Author

dycw commented Feb 4, 2023

Hi @Svetlanko , I am getting the same issue. Here's my attempt.

I'd like to point out that this used to work; I have an old repo running the exact same GH action and it all works!

image

@Svetlanko
Copy link

huh @dycw this is confusing indeed 🤨 thanks for sharing about the old repo..this doesn't make sense yet

@dycw
Copy link
Author

dycw commented Feb 8, 2023

Hi @Svetlanko I have found the issue, turns out new repos need this Read and write permissions settings turned on explicitly.

image

Here is the successful run on my test repo. Does this help?

@Svetlanko
Copy link

Svetlanko commented Feb 8, 2023

doh 😵‍💫 I am configuring reusable workflows and totally forgot to enable Read and write permissions option in one of the repos. enabled it only in 1 repo out of 2. thx @dycw for a hint/reminder 🙌 . enabling the option in both repos did the trick!

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

2 participants