Skip to content

Commit

Permalink
Merge pull request #48 from akirak/pulumi-ts
Browse files Browse the repository at this point in the history
Add a flake template for Pulumi TypeScript project
  • Loading branch information
akirak authored Aug 27, 2023
2 parents 64bc176 + 797f0fb commit c4b84f5
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-pulumi-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check pulumi-ts

on:
push:
paths:
- pulumi-ts/**
- .github/workflows/check-pulumi-ts.yml
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
with:
path: ./tmp
- run: nix flake new -t ./tmp#pulumi-ts ./work
- name: Prepare the project
working-directory: work
run: |
git init
git add .
- run: nix develop -L -c pulumi version
working-directory: work
- run: nix develop -L -c bash -c "command -v pulumi-language-nodejs"
working-directory: work
- run: nix develop -L -c typescript-language-server --version
working-directory: work
2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ You may be able to use [[https://github.com/serokell/mix-to-nix][serokell/mix-to
#+begin_src sh
nix flake init -t github:akirak/flake-templates#elixir-phoenix
#+end_src
*** [[file:pulumi-ts/flake.nix][pulumi-ts]]
[[https://www.pulumi.com/b/][Pulumi]], the Node.js language plugin, and ~typescript-language-server~ for development.
*** [[file:meta/][meta]]
This is a set of common metadata files for GitHub projects, such as =.gitignore=, =dependabot.yml=, etc.

Expand Down
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
path = ./node-typescript;
description = "Toolchain for TypeScript frontend projects";
};
pulumi-ts = {
path = ./pulumi-ts;
description = "Pulumi project in TypeScript";
};
elixir = {
path = ./elixir;
description = "Simple Elixir project";
Expand Down
25 changes: 25 additions & 0 deletions pulumi-ts/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
flake-utils,
systems,
}:
flake-utils.lib.eachSystem (import systems)
(system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
# packages = flake-utils.lib.flattenTree {
# };

devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pulumi
pulumiPackages.pulumi-language-nodejs
nodePackages.typescript-language-server
];
};
});
}

0 comments on commit c4b84f5

Please sign in to comment.