Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purplenoodlesoop/nix-act
https://github.com/purplenoodlesoop/nix-act
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/purplenoodlesoop/nix-act
- Owner: purplenoodlesoop
- License: mit
- Created: 2024-05-07T17:46:46.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-07T17:52:13.000Z (6 months ago)
- Last Synced: 2024-05-07T18:56:31.681Z (6 months ago)
- Language: Nix
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nix-act
This GitHub Action is designed to streamline the setup process for Nix environments in your CI workflows. It performs the following tasks:
- Checks out your repository.
- Installs Nix.
- Connects to a predefined Nix binary cache.
- Enters a specified Nix development environment.## Usage
To use this action in your GitHub workflows, follow these steps:
### 1. Add the Action to Your Workflow
You can include this action in a job of your GitHub Actions workflow by referencing it with the purplenoodlesoop/nix-act@master syntax. Here is an example on how to use it:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Nix and Environment
uses: purplenoodlesoop/nix-act@master
with:
environment: 'publish'
```### Inputs
This action supports the following input:
- `environment`: **Required**. The Nix environment to set up. This is typically a flake attribute, such as `publish` in the example above.
### Example Workflow
Below is a complete example of a workflow using the nix-act:
```yaml
name: Build and Deploy
on: [push]jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup Nix and Environment
uses: your-username/nix-setup-and-cache-action@v1
with:
environment: 'publish'
- name: Build site
run: nix build .#site
- name: Publish to Cloudflare Pages
uses: another-action/cloudflare-pages@v1
with:
some-param: value
```## Contributions
Contributions to this GitHub Action are welcome. You can contribute by:
- Reporting issues
- Suggesting new features or improvements
- Submitting pull requests to propose changes## License
The scripts and documentation in this project are released under the [MIT License](LICENSE).