artifact.ci

Browse uploaded GitHub Artifacts

APACHE-2.0 License

Stars
1

artifact.ci

What is this?

A wrapper around the actions/upload-artifact action which makes it possible to view the uploaded artifact in a browser.

⚠️Note⚠️ This isn't ready yet! Message me on X if you want to try it now.

It's a drop in replacement for the actions/upload-artifact action, so you can use it in the same way:

name: CI
on: [push]
jobs:
  run:
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npx playwright test --reporter html
-     - uses: actions/upload-artifact@v4
+     - uses: mmkal/artifact.ci/upload@main
        if: always()
        with:
          name: e2e-test-report
          path: playwright-report

This will print a link to the artifact in your workflow run output, which you can click to view in your browser:

Why

Lots of CI jobs can build really useful, interactive HTML reports - test runners, code coverage, website outputs, PDFs, images, etc. Some vendors out there offer dashboards for this kind of thing - a link you can click and see what's going on in your browser. But GitHub Actions doesn't - so when a test run fails, for example, you don't have the option of viewing the report in your browser. The existing option is to use actions/upload-artifact, then download it as a zip file, unzip it on your local machine, and then poke around at the files or run a local server. By using this action instead, you can just click the link logged by the action, and look at your artifact in your browser. This should really be a feature built into GitHub, and hopefully one day will be, but for now it isn't. (Note: it is built into some other CI providers like CircleCI).

Usage

Here are some high-level guides for how to get useful HTML outputs from various tools:

Testing frameworks

Other languages

More

It's not limited to HTML test reports. You can upload any kind of artifact that you might want to view in a browser.

...you get the idea. If you can render it statically in a web browser, you can upload it to artifact.ci.

Trust & Security

If you use this, you are sending your CI artifacts to a third-party service. You should only do this if there is no protected or proprietary information in these artifacts. The reason the service is open source is so you can see nothing is being done with the data. If you want to be extra sure of that, see the self-hosting page.

For convenience of use, a GitHub token is not required to upload artifacts for open source projects. However this does meant that in theory it is possible to spoof uploads. There are some protections against this - the upload API will check to make sure that the job id provided is running at the time it receives the request. And, only one request can be made for each repo/run/job/attempt. So, a spoofer would need to time their request to run right when your CI job is running, and have a way to gather all the information they need to make a valid request. So while this makes it very unlikely to happen - and if it did happen, you would notice the failed requests from your real CI job - it is still theoretically possible, so you should not consider the URLs generated by this service as 100% secure, unless you configure your repo to require a GitHub token.

For closed-source projects, a token will be required.

Free?

Right now this service itself is "free" in that uploads don't have a direct paywall, but since the storage costs money, I'm limiting access to the service to individuals or organizations that are sponsoring me on https://github.com/sponsors/mmkal.

I'm giving some users organizations free access - this is based on how much I use them myself, but if you would like to use this without sponsorship, contact me.

When

Get in touch on X if you would like to use this now. There may be changes to the API, and additional usage limits that are added.

Note that the GitHub team have mentioned a built-in solution is on their radar, so hopefully this will only be necessary for a short while.