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

🐛 [bug]: Unable to set URL of actionlint #14

Open
1 task done
bhundven opened this issue Nov 1, 2023 · 7 comments · May be fixed by #22
Open
1 task done

🐛 [bug]: Unable to set URL of actionlint #14

bhundven opened this issue Nov 1, 2023 · 7 comments · May be fixed by #22
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@bhundven
Copy link
Contributor

bhundven commented Nov 1, 2023

🐛 What happened?

Environmnet:

  • Github Enterprise Server
  • actions-sync to sync actions to a local org in our github enterprise

The action is trying to look for the latest version of rhysd/actionlint on our local GHES instance. Of course it is not there. I don't see a way to set the url to point at https://github.com/ instead.

🔬 How to reproduce?

See code sample/log

🏗️ Code Sample / Log

Workflow:

  actionlint:
    name: 'ActionLint'
    runs-on: [self-hosted]
      steps:
        - uses: actions/checkout@v3
        - uses: axon-actions/actionlint@v1

Output:

RequestError [HttpError]: Not Found
    at /runner/_work/_actions/actions/github-script/v6/dist/index.js:6842:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getToolReleaseLatest (eval at callAsyncFunction (/runner/_work/_actions/actions/github-script/v6/dist/index.js:15143:16), <anonymous>:58:20)
    at async eval (eval at callAsyncFunction (/runner/_work/_actions/actions/github-script/v6/dist/index.js:15143:16), <anonymous>:77:7)
    at async main (/runner/_work/_actions/actions/github-script/v6/dist/index.js:15236:20) {
  status: 404,
  response: {
    url: 'https://<redacted url for GHES>/api/v3/repos/rhysd/actionlint/releases/latest',
    status: 404,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Wed, 01 Nov 2023 16:51:34 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains',
      'transfer-encoding': 'chunked',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-enterprise-version': '3.8.10',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '3cb06c66-301c-488c-9774-5f7382604551',
      'x-runtime-rack': '0.024953',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Not Found',
      documentation_url: 'https://docs.github.com/enterprise-server@3.8/rest/reference/repos#get-the-latest-release'
    }
  },
  request: {
    method: 'GET',
    url: 'https://<redacted url for GHES>/api/v3/repos/rhysd/actionlint/releases/latest',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/16.20.1 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { agent: [Agent], hook: [Function: bound bound register] }
  }
}
Error: Unhandled error: HttpError: Not Found

🌌 Environment (actionlint action)

1.0.2

🌌 Environment (actionlint)

1.6.26

🌌 Environment (GitHub Runner OS)

Linux

📷 Screenshots

No response

📈 Expected behavior

It would by default pull from github.com, and allow you to set the URL of your github instance in case you do want to use a local version of rhysd/actionlint

📎 Additional context

No response

📜 Code of Conduct

  • I agree to follow this project's Code of Conduct.
@bhundven bhundven added the bug Something isn't working label Nov 1, 2023
@DariuszPorowski DariuszPorowski self-assigned this Nov 3, 2023
@DariuszPorowski
Copy link
Collaborator

@bhundven hmm good idea, will try to investigate how to handle it, because currently Action uses native GitHub SDK to determine actionlint version and the last thing what I want to do is to write own logic to do that.

@bhundven
Copy link
Contributor Author

@DariuszPorowski I got some ideas on how to fix this. I'll try and get a PR together.

@frederikb
Copy link

@bhundven Did you ever find the time to investigate this issue further or did you find a workaround? I'm in a similar situation.

@bhundven
Copy link
Contributor Author

bhundven commented Mar 8, 2024

@frederikb No, I haven't had time.

@bhundven
Copy link
Contributor Author

bhundven commented Mar 8, 2024

I think this depends on #11

@DariuszPorowski DariuszPorowski added the enhancement New feature or request label Mar 9, 2024
@DariuszPorowski DariuszPorowski linked a pull request Mar 9, 2024 that will close this issue
9 tasks
@DariuszPorowski DariuszPorowski linked a pull request Mar 9, 2024 that will close this issue
9 tasks
@DariuszPorowski
Copy link
Collaborator

@frederikb @bhundven just working on potential solution. In theory should works. Unfortunately, I do not have access to GHE so cannot fully test.
#22

p.s.
@bhundven It does not depend on #11 composite/js action after all use the same GH api.

@frederikb
Copy link

Thanks, @DariuszPorowski . I'll try to find some time next week to look through the changes and test drive it on a GHES instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants