mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Github actions use nix
This commit is contained in:
9
.github/workflows/ci-docs.yml
vendored
9
.github/workflows/ci-docs.yml
vendored
@ -6,16 +6,13 @@ on:
|
|||||||
- "master"
|
- "master"
|
||||||
jobs:
|
jobs:
|
||||||
check-website:
|
check-website:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v26
|
||||||
- name: Set current version
|
- name: Set current version
|
||||||
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
||||||
- uses: jorelali/setup-elm@v5
|
|
||||||
with:
|
|
||||||
elm-version: 0.19.1
|
|
||||||
- uses: cachix/install-nix-action@v26
|
|
||||||
- name: Build website (${{ env.DOCSPELL_VERSION }})
|
- name: Build website (${{ env.DOCSPELL_VERSION }})
|
||||||
run: nix develop .#dev-cnt --command sbt make-website
|
run: nix develop .#ci --command sbt make-website
|
||||||
|
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -5,32 +5,18 @@ on:
|
|||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
ci-matrix:
|
ci-matrix:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
|
||||||
java: [ 'openjdk@1.17' ]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100
|
fetch-depth: 100
|
||||||
- uses: jorelali/setup-elm@v5
|
|
||||||
with:
|
|
||||||
elm-version: 0.19.1
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: modules/webapp
|
|
||||||
- name: Fetch tags
|
- name: Fetch tags
|
||||||
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
|
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
|
||||||
- uses: olafurpg/setup-scala@v14
|
- uses: cachix/install-nix-action@v26
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java }}
|
|
||||||
# - name: Coursier cache
|
|
||||||
# uses: coursier/cache-action@v6
|
|
||||||
- name: sbt ci ${{ github.ref }}
|
- name: sbt ci ${{ github.ref }}
|
||||||
run: sbt ci
|
run: nix develop .#ci --command sbt ci
|
||||||
env:
|
|
||||||
SBT_OPTS: "-Xmx2G -Xss4m"
|
|
||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: [ci-matrix]
|
needs: [ci-matrix]
|
||||||
|
2
.github/workflows/docker-image.yml
vendored
2
.github/workflows/docker-image.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
types: [ published ]
|
types: [ published ]
|
||||||
jobs:
|
jobs:
|
||||||
docker-images:
|
docker-images:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
|
24
.github/workflows/release-nightly.yml
vendored
24
.github/workflows/release-nightly.yml
vendored
@ -5,36 +5,20 @@ on:
|
|||||||
- "master"
|
- "master"
|
||||||
jobs:
|
jobs:
|
||||||
release-nightly:
|
release-nightly:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
|
||||||
java: [ 'openjdk@1.17' ]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: olafurpg/setup-scala@v14
|
- uses: cachix/install-nix-action@v26
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java }}
|
|
||||||
- uses: jorelali/setup-elm@v5
|
|
||||||
with:
|
|
||||||
elm-version: 0.19.1
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: modules/webapp
|
|
||||||
# - name: Coursier cache
|
|
||||||
# uses: coursier/cache-action@v6
|
|
||||||
- name: Set current version
|
- name: Set current version
|
||||||
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
||||||
- name: sbt ci ${{ github.ref }}
|
- name: sbt ci ${{ github.ref }}
|
||||||
run: sbt ci
|
run: nix develop .#ci --command sbt ci
|
||||||
env:
|
|
||||||
SBT_OPTS: "-Xmx2G -Xss4m"
|
|
||||||
- name: sbt make-pkg (${{ env.DOCSPELL_VERSION }})
|
- name: sbt make-pkg (${{ env.DOCSPELL_VERSION }})
|
||||||
run: sbt make-pkg
|
run: nix develop .#ci --command sbt make-pkg
|
||||||
env:
|
|
||||||
SBT_OPTS: "-Xmx2G -Xss4m"
|
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -5,32 +5,18 @@ on:
|
|||||||
- 'v*'
|
- 'v*'
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
|
||||||
java: [ 'openjdk@1.17' ]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: olafurpg/setup-scala@v14
|
- uses: cachix/install-nix-action@v26
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java }}
|
|
||||||
- uses: jorelali/setup-elm@v5
|
|
||||||
with:
|
|
||||||
elm-version: 0.19.1
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: modules/webapp
|
|
||||||
# - name: Coursier cache
|
|
||||||
# uses: coursier/cache-action@v6
|
|
||||||
- name: Set current version
|
- name: Set current version
|
||||||
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
||||||
- name: sbt make-pkg (${{ env.DOCSPELL_VERSION }})
|
- name: sbt make-pkg (${{ env.DOCSPELL_VERSION }})
|
||||||
run: sbt make-pkg
|
run: nix develop .#ci --command sbt make-pkg
|
||||||
env:
|
|
||||||
SBT_OPTS: "-Xmx2G -Xss4m"
|
|
||||||
- uses: meeDamian/github-release@2.0
|
- uses: meeDamian/github-release@2.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
11
.github/workflows/website.yml
vendored
11
.github/workflows/website.yml
vendored
@ -5,20 +5,17 @@ on:
|
|||||||
- "current-docs"
|
- "current-docs"
|
||||||
jobs:
|
jobs:
|
||||||
publish-website:
|
publish-website:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v26
|
||||||
- name: Set current version
|
- name: Set current version
|
||||||
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
run: echo "DOCSPELL_VERSION=$(cat version.sbt | grep version | cut -d= -f2 | xargs)" >> $GITHUB_ENV
|
||||||
- uses: jorelali/setup-elm@v5
|
|
||||||
with:
|
|
||||||
elm-version: 0.19.1
|
|
||||||
- uses: cachix/install-nix-action@v26
|
|
||||||
- name: Build website (${{ env.DOCSPELL_VERSION }})
|
- name: Build website (${{ env.DOCSPELL_VERSION }})
|
||||||
run: nix develop .#dev-cnt --command sbt make-website
|
run: nix develop .#ci --command sbt make-website
|
||||||
- name: Publish website (${{ env.DOCSPELL_VERSION }})
|
- name: Publish website (${{ env.DOCSPELL_VERSION }})
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: nix develop .#dev-cnt --command sbt publish-website
|
run: nix develop .#ci --command sbt publish-website
|
||||||
|
22
flake.nix
22
flake.nix
@ -16,22 +16,24 @@
|
|||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
sbt17 = pkgs.sbt.override { jre = pkgs.jdk17; };
|
sbt17 = pkgs.sbt.override { jre = pkgs.jdk17; };
|
||||||
devshellPkgs = with pkgs; [
|
ciPkgs = with pkgs; [
|
||||||
jq
|
|
||||||
scala-cli
|
|
||||||
sbt17
|
sbt17
|
||||||
|
|
||||||
netcat
|
|
||||||
jdk17
|
jdk17
|
||||||
wget
|
|
||||||
which
|
|
||||||
dpkg
|
dpkg
|
||||||
elmPackages.elm
|
elmPackages.elm
|
||||||
fakeroot
|
fakeroot
|
||||||
zola
|
zola
|
||||||
yarn
|
yarn
|
||||||
inotifyTools
|
nodejs
|
||||||
];
|
];
|
||||||
|
devshellPkgs = ciPkgs ++ (with pkgs; [
|
||||||
|
jq
|
||||||
|
scala-cli
|
||||||
|
netcat
|
||||||
|
wget
|
||||||
|
which
|
||||||
|
inotifyTools
|
||||||
|
]);
|
||||||
docspellPkgs = pkgs.callPackage (import ./nix/pkg.nix) {};
|
docspellPkgs = pkgs.callPackage (import ./nix/pkg.nix) {};
|
||||||
dockerAmd64 = pkgs.pkgsCross.gnu64.callPackage (import ./nix/docker.nix) {
|
dockerAmd64 = pkgs.pkgsCross.gnu64.callPackage (import ./nix/docker.nix) {
|
||||||
inherit (docspellPkgs) docspell-restserver docspell-joex;
|
inherit (docspellPkgs) docspell-restserver docspell-joex;
|
||||||
@ -101,6 +103,10 @@
|
|||||||
DEV_VM = "dev-vm";
|
DEV_VM = "dev-vm";
|
||||||
VM_SSH_PORT = "10022";
|
VM_SSH_PORT = "10022";
|
||||||
};
|
};
|
||||||
|
ci = pkgs.mkShellNoCC {
|
||||||
|
buildInputs = ciPkgs;
|
||||||
|
SBT_OPTS = "-Xmx2G -Xss4m";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
// {
|
// {
|
||||||
|
Reference in New Issue
Block a user