Coder Social home page Coder Social logo

circleci-artifacts-redirector-action's People

Contributors

asmeurer avatar bollwyvl avatar dependabot[bot] avatar joycebrum avatar larsoner avatar nicolashug avatar stepanhruda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

circleci-artifacts-redirector-action's Issues

The action doesn't work in our project

First of all, thank you so much for creating this very useful action!


We're trying to utilise this action, but it doesn't work. Would it be possible for you to point out any possible causes making this action not working in our setting?

Following the README.md, I see its debug-level log by enabling ACTIONS_STEP_DEBUG=true, but I don't see any relevant information there:

Our workflow file in master:

on: [status]
jobs:
  circleci_artifacts_redirector_job:
    runs-on: ubuntu-20.04
    steps:
    - uses: larsoner/circleci-artifacts-redirector-action@master
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        artifact-path: 0/html/index.html
        circleci-jobs: build-Docs
        job-title: Check the rendered docs here!

https://github.com/PyTorchLightning/pytorch-lightning/blob/a6e9bc2943bf2c82036e31a4948bd8caa54957ee/.github/workflows/docs-link.yml

Our CircleCI job that generates artifacts:
https://github.com/PyTorchLightning/pytorch-lightning/blob/a6e9bc2943bf2c82036e31a4948bd8caa54957ee/.circleci/config.yml#L162

Any help is welcome. Thank you in advance.

Artifact not found

we've been using this extension for a while now and recently the link stopped working,
for example in openturns/openturns#1995
the link provided is https://9096-40717169-gh.circle-artifacts.com/0/html/index.html which results in an "Artifact not found" page
if I follow the artifact link from the circleci job I see that it ends at:
https://output.circle-artifacts.com/output/job/7d1e22b0-669f-42f8-a1c1-442ab387aa06/artifacts/0/html/index.html
should something be updated here, or is circleci wrong ?

the link job should be pretty standard:
https://github.com/openturns/openturns/blob/master/.github/workflows/circleci.yml

Broken link when PR source repo has CircleCI enabled

Looking at the source, it seems like you use payload.repository.id in the domain name for links. That ID seems to point to the target repo. The way CircleCI works is to build a head commit, not a merge, so the target doesn't matter. If the source repo also has CircleCI enabled, then the build is not run again for the PR. The domain name then has the ID of the source repository.

For example, in this PR, the link from the Action is posted as:
https://31997-1385122-gh.circle-artifacts.com/0/doc/build/html/index.html
i.e., repository ID = 1385122, but navigating through the build, the link should be:
https://13144-7439715-gh.circle-artifacts.com/0/doc/build/html/index.html
with repository ID = 7439715, which corresponds with the source repo.

I don't know if this information is exposed somehow in the payload.

Quick question to get this action to work again?

Hi,

For some reason I noticed that this Gh action stopped working awhile ago. Now https://github.com/neurodata/scikit-tree/actions/workflows/circle_artifacts.yml shows it is only trigged by codecov(?) but not run?

Here is my workflow file: https://github.com/neurodata/scikit-tree/blob/main/.github/workflows/circle_artifacts.yml
Here is my circleCI docs build file: https://github.com/neurodata/scikit-tree/blob/main/.circleci/config.yml

I'm wondering if you can easily spot something that's not working?

Action tries to read unknown property 'length'

Context

We use this action a lot, and it is very useful to test-build our HTML pages and link them to our pull requests. So first off: Thank you for this contribution!

Expectation

Usually, an action html_demo artifact is run, the details of which in the PR (e.g., here) link to the HTML artifacts on CircleCI.

Bug

Yesterday for the first time, the action threw the error message:

Error: Cannot read properties of undefined (reading 'length')

For the Action log, see here: https://github.com/hbrs-cse/Modellbildung-und-Simulation/actions/runs/4688129308/jobs/8308267867

Our Code

We run

Run larsoner/circleci-artifacts-redirector-action@master
  with:
    repo-token: ***
    artifact-path: 0/html/index.html
    circleci-jobs: html_demo

Debug messages

The full debug message is in the Action log.

The curious part imho is

##[debug]build: 3617
##[debug]Fetching JSON: https://circleci.com/api/v2/project/gh/hbrs-cse/Modellbildung-und-Simulation/3617/artifacts
##[debug]Artifacts JSON (status=404):
##[debug]{"message":"Job not found."}
Error: Cannot read properties of undefined (reading 'length')

Suspicion

length is only used by index.js to create the URL. This seems to be a follow-up error, because:

The URL from which the JSON is fetched, is correct. However, the status is returned as 404 and the JSON {"message":"Job not found."} is only returned for other URLs, such as this one.

Document that actions must be configured to have write permissions

I was trying to use this and couldn't get it to write a status to any PR until I enabled the "read and write permissions" actions setting in the repo settings. This doesn't seem to be mentioned anywhere in the README. It's not clear to me why that should be needed, but it apparently it.

Crazy suggestion: a badge pointing to the latest artifacts?

Hi @larsoner , thanks for this gem which we use in so many projects!

I have a bit of a crazy suggestion / feature request: would it be possible to use this action (or a related one) to generate a badge that could be put in the readme and that would point to the latest artifacts that ran successful on master? Such a badge would be super useful to avoid having to connect circleCI to push to a repo to update the dev version of the docs, which is something a bit tedious to do.

Action produces hundreds of failed builds

If you look at https://github.com/sympy/sympy/actions/workflows/docs-preview.yml, you can see there are a ton of failed builds for the docs preview action. I think this is because it runs every time there is a status change from any CI job, but it only makes sense when the status change actually comes from the CircleCI job.

Is it possible to make the action not run at all in these cases? It's obviously not a huge issue, but the current way is fairly confusing, and makes the "all workflows" list harder to read https://github.com/sympy/sympy/actions.

By the way, do you know why half of those jobs are indicated as being started by me, even for commits that I had nothing to do with? How does GitHub determine who the author of a "status" update is?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.