Coder Social home page Coder Social logo

setup-just's Introduction

๐Ÿค– setup-just action

Build Status

This GitHub Action will install a release of the just command runner for you.

Usage

Examples

In most cases all you will need is the following in your workflow.

- uses: extractions/setup-just@v2

If you want a specific version of just you can specify this by passing the just-version input.

- uses: extractions/setup-just@v2
  with:
    just-version: '1.4.0'

To avoid rate-limiting, the default Github token available to all actions, is automatically used to authenticate calls to Github. To override it, set the environment variable GITHUB_TOKEN or pass the input github-token.

- uses: extractions/setup-just@v2
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

or

- uses: extractions/setup-just@v2
  with:
    github-token: ${{ secrets.MY_GITHUB_TOKEN }}

Inputs

Name Required Description Type Default
just-version no A valid NPM-style semver specification. string *
github-token no A Github token to authenticate API requests. string ${{ github.token }}

The semver specification is passed directly to NPM's semver package. This GitHub Action will install the latest matching release. Examples include

  • just-version: '*' latest version (default).
  • just-version: '0.10' equivalent to >=0.10.0 <0.11.0.
  • just-version: '0.10.x' equivalent to >=0.10.0 <0.11.0.
  • just-version: '0.10.0' equivalent to =0.10.0.
  • just-version: '^0.10.0' equivalent to >=0.10.0 <0.11.0.

Development

Most of the installation logic is done in a shared library located at @extractions/setup-crate.

The following commands are useful for development.

  • npm i

    Install all dependencies.

  • npm run fmt

    Format the source code.

  • npm run lint

    Run all lints.

  • npm run run

    Test the action by running it.

  • npm run build

    Build the action and update dist/.

License

Licensed under either of

at your option.

setup-just's People

Contributors

acj avatar cclauss avatar rossmacarthur avatar simse avatar zzztimbo avatar

Stargazers

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

Watchers

 avatar  avatar

setup-just's Issues

Deprecated Node version warnings

Using this action now triggers a deprecation warning:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: extractions/setup-just

Use GITHUB_TOKEN by default

Thanks for putting together this action!

I recently set up just and am now running it in a pipeline with a matrix of 3 different Python versions on 3 different OSes, resulting in 9 parallel jobs. See this run for context. It failed on its first try using just and setup-just!

In the README, it says:

setup-just/README.md

Lines 27 to 29 in 95b912d

In rare circumstances you might get rate limiting errors, this is because this
workflow has to make requests to GitHub API in order to list available releases.
If this happens you can set the `GITHUB_TOKEN` environment variable.

I'd argue my use case is not that rare. After all, unauthenticated API access is limited to just 60 requests per hour. It seems this action exhausts these quickly, which is fair and can happen.

One suggestion: some actions use the GITHUB_TOKEN by default, e.g. release-please. Would it be possible to implement this behaviour? It would save users from having to specify the environment variable manually, and would eradicate nasty surprises like the one above almost entirely (5000 requests per hour limit).

[Contribution Request] bump2version, CFF and Dependabot

Hello, @rossmacarthur!

I like this GitHub Action and would like to suggest you some utilities in order to simplify and support the development process as well as to enhance the documentation. If you would like to try out some of these, I can submit a Pull Request with the respective initial setups.

bump2version

bump2version is an MIT-licensed Python 3-CLI to automatically increment all hard coded version numbers in the project. It can also automatically create a tag for the new version which would support the release workflow in my opinion. The behaviour is controlled by a self-maintaining configuration file; it will update itself when the application is called.

The setup would consist of the configuration file, .bumpversion.cfg, with the appropriate initial settings. The selection can be discussed in the following, if this tool should be interesting for this project.

As the configuration file maintains itself, no additional maintenance effort would be introduced.

CFF

CFF is a standard to cite software. If a GitHub repository contains a valid CITATION.cff in its root, GitHub will render a "Cite this repository" blob with two common citation meta data formats -- APA and BibTeX. These entries can be added to the documentation of a project which makes use of this Action; Doxygen, for instance, supports BibTeX reference lists. Providing a CITATION.cff thus supports and enhances not only the documentation of this project, it can be also considered "Free advertisement" for this GitHub Action if users cite it in their documentations or recommend it to others with the citation meta data.

The setup would consist of a valid CITATION.cff with the meta data derived from the publicly available information GitHub and this repository provide. In addition, I would also prepare the automatic validator for the CITATION.cff, a GitHub Action which is known to succeed in about 10 seconds (a whole run takes about 30 seconds).

The CITATION.cff can be maintained semi-automatically by bump2version (version number), just the release needs to be adjusted by hand. The validation Action can be maintained by Dependabot (next section).

Dependabot

Dependabot is a GitHub bot which keeps track of the configured dependencies and suggests version updates for them as Pull Requests. The amount and frequency can be configured in its configuration file, the Pull Requests can be accepted by writing an email to them (email applications usually call it "Reply to List" or something similar). These automatic version updates prevent outdated dependency libraries and problems caused thereby.

The setup would consist of the configuration file, .github/dependabot.yml. The frequency and amount of Pull Requests raised by Dependabot is controlled by this file, the initial values can be discussed in the following, if this tool should be interesting for this project.

The configuration file does not need any major maintenance, the options can be configured as required.

Conclusion

Please choose whatever you would like to try out for this project and I will submit an according initial setup for the respective utilities. If none of them should be interesting for this project, please close this issue as "not planned".

CFF can be set up without any further information, for bump2version as well as Dependabot, I would need some further information in order to configure the tools appropriately. There are also alternatives to bump2version, for instance tbump; however, I only worked with bump2version so far, thus I am not sure how to configure one of its alternatives.

If the creation of CHANGELOG should be planned and / or there is a multi-branch workflow for the development, we can also discuss the CHANGELOG manager Scriv which assembles the CHANGELOG on release and which can be combined conveniently with bump2version.

Error : no release for just matching version specifier 0.1

Hi,

I tired to use the setup-just action in my own workflow. Unfortunatly I'm confronted to this error message (tested for version 0.8, 0.10 and latest (without version)).

image

Do any of you encounter this issue ?

Example of usage in the workflow:

build:
    runs-on: ubuntu-latest
    needs: test
    steps:
      - uses: actions/checkout@v2
      - uses: extractions/setup-just@v1
        with:
          just-version: 0.10
      - uses: actions/setup-node@v1
        with:
          node-version: '14'
      - uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - uses: docker/setup-qemu-action@v1
      - uses: docker/setup-buildx-action@v1
        id: buildx
        with:
          install: true

[Feature Request] Tag Latest Version Twice

Hello, @rossmacarthur!

Thank you for this Action!

With this issue, I would like to ask you to give the latest a second tag with its whole version number (v1.5.0) in addition to the v1 tag. This procedure is practiced, for example, also by the maintainers of the checkout Action.

The reason for this request is that, at the moment, the current tagging strategy lead to some confusion, as the discussion in #6 shows. Always giving the latest version a second tag in addition to moving the v1 tag forwards would not break anything for users preferring the major tag but benefits automatic version updates by Dependabot and furthermore clarifies the current version number.

Please consider to give the version 1.5.0 a second tag named v1.5.0.

Document how to bundle the action

I think it'd be good to have a documented way to rebuild the minified bundle in dist. Ideally in a reproducible way.

I tried to figure out how to do that, here's what I did:

  • I looked at package.json and it seems like the dist directory can be populated by npm run-script build. (Is that correct?)
  • I tried that, but ncc couldn't be found. There's multiple nccs on npm, is this the one being used here? If yes, I think it should be added to the dev dependencies. IIRC all executables from dev dependencies are automatically available through the $PATH when running npm run-script something.
  • After adding @vercel/ncc to the dev dependencies I get other errors, e.g. TS2792: Cannot find module '@extractions/setup-crate'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?.

Thank you :)

Hi, I wanted to say thanks for building this.

just is a lifesaver and this Action is too!

Node.js version deprecated

Now receiving the following warning in my workflows:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: extractions/setup-just@v1.
For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

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.