Coder Social home page Coder Social logo

flox / install-flox-action Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 1.15 MB

Installs flox on GitHub Actions for the supported platforms: Linux and macOS.

Home Page: https://flox.dev

License: MIT License

Shell 52.71% Nix 6.50% JavaScript 40.79%
flox actions floxdev

install-flox-action's Introduction

Harness the Power of Nix

Discourse   |   Documentation   |   Blog   |   Twitter

GitHub PRs Welcome GitHub tag (latest by date)

Installs flox on GitHub Actions for the supported platforms: Linux and macOS.

flox is a command line tool that helps you manage your environments. flox builds on top of the powerful ideas of Nix as well as making them accessible to everybody.

⭐ Getting Started

Create .github/workflows/ci.yml in your repo with the following contents:

name: "CI"

on:
  pull_request:
  push:

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:

    - name: Checkout
      uses: actions/checkout@v3

    - name: Install flox
      uses: flox/install-flox-action@v2

    - name: Build
      run: flox build

🚀 Add caching for faster CI

Caching with flox can be achieved by configuring what is known as substituter.

You can see in an example below how to configure your GitHub workflow to push build artifacts to a remote location. In the case of this example it is an AWS S3 Bucket.

With caching configured all subsequent builds will be faster since flox does not have to build them again.

See nix help-stores for more information on the supported URIs.

name: "CI"

on:
  push:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

    - name: Checkout
      uses: actions/checkout@v3

    - name: Install flox
      uses: flox/install-flox-action@v2
      with:
        substituter: s3://your-cache-here # see `nix help-stores` for supported uris
        substituter-key: ${{ secrets.FLOX_STORE_PUBLIC_NIX_SECRET_KEY }}
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

    - name: Build
      run: |
        flox build

Builders

Can configure remote builders via:

        remote-builders: |
            ssh://user@host x86_64-linux /ssh-key - - - - <base64_ssh_host_key>
            ssh://user@host aarch64-linux /ssh-key - - - - <base64_ssh_host_key>
            ssh://user@host x86_64-darwin /ssh-key - - - - <base64_ssh_host_key>
            ssh://user@host aarch64-darwin /ssh-key - - - - <base64_ssh_host_key>

Read more about the remote builders format.

📫 Have a question? Want to chat? Ran into a problem?

We are happy to welcome you to our Discourse forum and answer your questions! You can always reach out to us directly via the flox twitter account or chat to us directly on Matrix or Discord.

🤝 Found a bug? Missing a specific feature?

Feel free to file a new issue with a respective title and description on the the flox/install-flox-action repository. If you already found a solution to your problem, we would love to review your pull request!

🪪 License

The install-flox-action is licensed under the MIT. See LICENSE.

install-flox-action's People

Contributors

aakropotkin avatar bryanhonof avatar dependabot[bot] avatar garbas avatar mkenigs avatar notgne2 avatar tomberek avatar ysndr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

install-flox-action's Issues

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.