Compare commits
	
		
			7 Commits
		
	
	
		
			fix-segfau
			...
			fix-build-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | d266f22fdb | ||
|  | 7f8f39bf55 | ||
|  | 645ab54feb | ||
|  | 557c7af1de | ||
|  | 82911d15ab | ||
|  | ff1a6b6f95 | ||
|  | fc1e077596 | 
							
								
								
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| name: "nix-action test" | name: "install-nix-action test" | ||||||
| on: | on: | ||||||
|   pull_request: |   pull_request: | ||||||
|   push: |   push: | ||||||
| @@ -12,6 +12,8 @@ jobs: | |||||||
|     - uses: actions/checkout@v1 |     - uses: actions/checkout@v1 | ||||||
|     - run: yarn install --frozen-lockfile |     - run: yarn install --frozen-lockfile | ||||||
|     - run: yarn build |     - run: yarn build | ||||||
|  |     # TODO: just commit it using github | ||||||
|  |     - run: git diff --exit-code | ||||||
|     - run: yarn test |     - run: yarn test | ||||||
|     - name: Install Nix |     - name: Install Nix | ||||||
|       uses: ./ |       uses: ./ | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,8 +1,8 @@ | |||||||
| # nix-action | # install-nix-action | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Installs [Nix](https://nixos.org/nix/) in platform agnostic way (supports: Linux/macOS). | Installs [Nix](https://nixos.org/nix/) on GitHub Actions for the supported platforms: Linux and macOS. | ||||||
|  |  | ||||||
| ## Usage | ## Usage | ||||||
|  |  | ||||||
| @@ -18,12 +18,13 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |     - uses: actions/checkout@v1 | ||||||
|     - uses: cachix/nix-action@v1 |     - uses: cachix/install-nix-action@v1 | ||||||
|     - run: nix-build |     - run: nix-build | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| See also [cachix-action](https://github.com/cachix/cachix-action) for | See also [cachix-action](https://github.com/cachix/cachix-action) for | ||||||
| simple binary cache setup. | simple binary cache setup to speed up your builds and share binaries | ||||||
|  | with developers. | ||||||
|  |  | ||||||
| --- | --- | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| name: 'Nix' | name: 'Install Nix' | ||||||
| description: 'Install Nix' | description: 'Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.' | ||||||
| author: 'Domen Kožar' | author: 'Domen Kožar' | ||||||
| branding: | branding: | ||||||
|   color: 'blue' |   color: 'blue' | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								lib/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								lib/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  |  | ||||||
|  | # Generated Code | ||||||
|  |  | ||||||
|  | The files in this directory are generated. | ||||||
|  | See [src](../src) | ||||||
| @@ -24,11 +24,13 @@ const fs_1 = require("fs"); | |||||||
| function run() { | function run() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         try { |         try { | ||||||
|             // rest of the constants |  | ||||||
|             const home = os_1.homedir(); |             const home = os_1.homedir(); | ||||||
|             const { username } = os_1.userInfo(); |             const { username } = os_1.userInfo(); | ||||||
|             const PATH = process.env.PATH; |             const PATH = process.env.PATH; | ||||||
|             const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt'; |             const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt'; | ||||||
|  |             // Workaround a segfault: https://github.com/NixOS/nix/issues/2733 | ||||||
|  |             yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]); | ||||||
|  |             yield exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]); | ||||||
|             // TODO: retry due to all the things that go wrong |             // TODO: retry due to all the things that go wrong | ||||||
|             const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install'); |             const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install'); | ||||||
|             yield exec.exec("sh", [nixInstall]); |             yield exec.exec("sh", [nixInstall]); | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| { | { | ||||||
|   "name": "nix-action", |   "name": "install-nix-action", | ||||||
|   "version": "1.0.0", |   "version": "1.0.0", | ||||||
|   "private": true, |   "private": true, | ||||||
|   "description": "nix-build with the help of caching to Cachix", |   "description": "Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.", | ||||||
|   "main": "lib/main.js", |   "main": "lib/main.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "build": "tsc", |     "build": "tsc", | ||||||
| @@ -10,7 +10,7 @@ | |||||||
|   }, |   }, | ||||||
|   "repository": { |   "repository": { | ||||||
|     "type": "git", |     "type": "git", | ||||||
|     "url": "git+https://github.com/cachix/nix-action.git" |     "url": "git+https://github.com/cachix/install-nix-action.git" | ||||||
|   }, |   }, | ||||||
|   "keywords": [ |   "keywords": [ | ||||||
|     "actions", |     "actions", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user