Coder Social home page Coder Social logo

asmeurer / circleci-artifacts-redirector-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from larsoner/circleci-artifacts-redirector-action

0.0 1.0 0.0 370 KB

GitHub Action to add a GitHub status link to a CircleCI artifact.

License: MIT License

JavaScript 100.00%

circleci-artifacts-redirector-action's Introduction

circleci-artifacts-redirector-action

GitHub Action to add a GitHub status link to a CircleCI artifact.

Example usage

Sample .github/workflows/main.yml:

on: [status]
jobs:
  circleci_artifacts_redirector_job:
    runs-on: ubuntu-latest
    name: Run CircleCI artifacts redirector
    steps:
      - name: GitHub Action step
        id: step1
        uses: larsoner/circleci-artifacts-redirector-action@master
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          artifact-path: 0/test_artifacts/root_artifact.md
          circleci-jobs: build_doc
          job-title: Check the rendered docs here!
      - name: Check the URL
        run: |
          curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA
  • The artifact-path should point to an artifact path from your CircleCI build. This is typically whatever follows the CircleCI artifact root path, for example 0/test_artifacts/root_artifact.md.
  • The circleci-jobs is a comma-separated list of jobs to monitor, but usually there is a single one that you want an artifact path for. The default is "build_docs,build,doc", which will look for any jobs with these names and create an artifacts link for them.
  • The job-title corresponds to the name of the action job as it will appear on github. It is not the circle-ci job you want the artifacts for (this is circleci-jobs). This field is optional.
  • If you have trouble, try enabling debugging logging for the action by setting the secret ACTIONS_STEP_DEBUG=true.

Note: The standard PR-to-main-repo-from-branch-in-a-fork workflow might not activate the action. For changes to take effect, changes might need to be made to to the default branch in a repo with the action enabled. For example, you could iterate directly in master, or in master of a fork. This seems to be a limitation of the fact that CircleCI uses the status (rather than app) API and that this is always tied to the master/default branch of a given repository.

Limitations

Currently has (known) limitations:

  • Tests do not test anything (haven't gotten around to fixing them)
  • Only allows redirecting to a single file that must be configured ahead of time as a file (cannot be changed within the CircleCI run)

Eventually this might be fixable by a bit of work and addition of customization options.

Contributing

Make sure you have done npm install to get all dependencies and used ncc build index.js before committing and opening a PR.

circleci-artifacts-redirector-action's People

Contributors

bollwyvl avatar dependabot[bot] avatar larsoner avatar nicolashug avatar

Watchers

 avatar

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.