Showing with 22 additions and 3,807 deletions.
  1. +2 −18 .github/workflows/test.yml
  2. +4 −4 README.md
  3. +9 −2 action.yml
  4. +7 −1 {lib → }/install-nix.sh
  5. +0 −5 lib/README.md
  6. +0 −4 lib/main.js
  7. +0 −36 package.json
  8. +0 −8 shell.nix
  9. +0 −3 src/main.ts
  10. +0 −63 tsconfig.json
  11. +0 −3,663 yarn.lock
20 changes: 2 additions & 18 deletions .github/workflows/test.yml
Expand Up @@ -13,8 +13,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -24,16 +22,13 @@ jobs:
# cachix should be available and be able to configure a cache
- run: cachix use cachix
- run: nix-build test.nix

custom-nix-path:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -48,8 +43,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -66,8 +59,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -84,8 +75,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -101,8 +90,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install Nix
uses: ./
with:
Expand All @@ -117,9 +104,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2.2.0
with:
go-version: '^1.16'
- run: go install github.com/nektos/act@latest
- run: curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
- run: docker pull ghcr.io/catthehacker/ubuntu:js-20.04
- run: ~/go/bin/act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-20.04 push -j simple-build
- run: ./bin/act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-20.04 push -j simple-build
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -33,8 +33,8 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v15
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build
Expand All @@ -52,8 +52,8 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v15
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 9 additions & 2 deletions action.yml
Expand Up @@ -14,5 +14,12 @@ branding:
color: 'blue'
icon: 'sun'
runs:
using: 'node12'
main: 'lib/main.js'
using: 'composite'
steps:
- run : ${{ github.action_path }}/install-nix.sh
shell: bash
env:
INPUT_INSTALL_URL: ${{ inputs.install_url }}
INPUT_INSTALL_OPTIONS: ${{ inputs.install_options }}
INPUT_NIX_PATH: ${{ inputs.nix_path }}
INPUT_EXTRA_NIX_CONFIG: ${{ inputs.extra_nix_config }}
8 changes: 7 additions & 1 deletion lib/install-nix.sh → install-nix.sh
Expand Up @@ -6,6 +6,9 @@ if type -p nix &>/dev/null ; then
exit
fi

# GitHub command to put the following log messages into a group which is collapsed by default
echo "::group::Installing Nix"

# Create a temporary workdir
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
Expand Down Expand Up @@ -37,7 +40,7 @@ installer_options=(
if [[ $OSTYPE =~ darwin || -e /run/systemd/system ]]; then
installer_options+=(
--daemon
--daemon-user-count "$(python -c 'import multiprocessing as mp; print(mp.cpu_count() * 2)')"
--daemon-user-count "$(python3 -c 'import multiprocessing as mp; print(mp.cpu_count() * 2)')"
)
else
# "fix" the following error when running nix*
Expand Down Expand Up @@ -84,3 +87,6 @@ echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH"
if [[ $INPUT_NIX_PATH != "" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
fi

# Close the log message group which was opened above
echo "::endgroup::"
5 changes: 0 additions & 5 deletions lib/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions lib/main.js

This file was deleted.

36 changes: 0 additions & 36 deletions package.json

This file was deleted.

8 changes: 0 additions & 8 deletions shell.nix

This file was deleted.

3 changes: 0 additions & 3 deletions src/main.ts

This file was deleted.

63 changes: 0 additions & 63 deletions tsconfig.json

This file was deleted.