mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
update CI
This commit is contained in:
parent
f9ae40f53c
commit
aad58f1d6b
3 changed files with 20 additions and 20 deletions
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
|
|
@ -11,36 +11,32 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
-
|
- name: Login to ghcr.io
|
||||||
name: Login to ghcr.io
|
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
- name: Build container and push to ghcr.io
|
||||||
name: Build container and push to ghcr.io
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/iofq/nvim:latest
|
tags: ghcr.io/iofq/nvim:latest
|
||||||
-
|
- name: Extract full .tar.gz from container
|
||||||
name: Extract full .tar.gz from container
|
|
||||||
uses: shrink/actions-docker-extract@v1
|
uses: shrink/actions-docker-extract@v1
|
||||||
id: extract
|
id: extract
|
||||||
with:
|
with:
|
||||||
image: ghcr.io/iofq/nvim:latest
|
image: ghcr.io/iofq/nvim:latest
|
||||||
path: /app/neovim-x86_64-linux.AppImage
|
path: /out/neovim-x86_64-linux.AppImage
|
||||||
|
|
||||||
-
|
- name: Extract minimal .tar.gz from container
|
||||||
name: Extract minimal .tar.gz from container
|
|
||||||
uses: shrink/actions-docker-extract@v1
|
uses: shrink/actions-docker-extract@v1
|
||||||
id: extract-minimal
|
id: extract-minimal
|
||||||
with:
|
with:
|
||||||
image: ghcr.io/iofq/nvim:latest
|
image: ghcr.io/iofq/nvim:latest
|
||||||
path: /app/neovim-x86_64-linux-minimal.AppImage
|
path: /out/neovim-x86_64-linux-minimal.AppImage
|
||||||
-
|
|
||||||
name: Upload archive to release
|
- name: Upload archive to release
|
||||||
uses: xresloader/upload-to-github-release@v1
|
uses: xresloader/upload-to-github-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -48,8 +44,8 @@ jobs:
|
||||||
file: ${{ steps.extract.outputs.destination }}
|
file: ${{ steps.extract.outputs.destination }}
|
||||||
update_latest_release: true
|
update_latest_release: true
|
||||||
overwrite: true
|
overwrite: true
|
||||||
-
|
|
||||||
name: Upload archive to release
|
- name: Upload archive to release
|
||||||
uses: xresloader/upload-to-github-release@v1
|
uses: xresloader/upload-to-github-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,2 @@
|
||||||
*.AppImage
|
*.AppImage
|
||||||
squashfs_root
|
squashfs-root
|
||||||
|
|
|
||||||
14
Dockerfile
14
Dockerfile
|
|
@ -1,18 +1,22 @@
|
||||||
FROM nixos/nix
|
FROM nixos/nix as build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN nix bundle \
|
RUN mkdir -p /out && \
|
||||||
|
nix bundle \
|
||||||
-o nvim.AppImage \
|
-o nvim.AppImage \
|
||||||
--bundler github:ralismark/nix-appimage \
|
--bundler github:ralismark/nix-appimage \
|
||||||
--extra-experimental-features nix-command \
|
--extra-experimental-features nix-command \
|
||||||
--extra-experimental-features flakes .#full && \
|
--extra-experimental-features flakes .#full && \
|
||||||
mv $(realpath nvim.AppImage) neovim-x86_64-linux.AppImage && \
|
mv $(realpath nvim.AppImage) /out/neovim-x86_64-linux.AppImage && \
|
||||||
nix bundle \
|
nix bundle \
|
||||||
-o nvim-minimal.AppImage \
|
-o nvim-minimal.AppImage \
|
||||||
--bundler github:ralismark/nix-appimage \
|
--bundler github:ralismark/nix-appimage \
|
||||||
--extra-experimental-features nix-command \
|
--extra-experimental-features nix-command \
|
||||||
--extra-experimental-features flakes .#minimal && \
|
--extra-experimental-features flakes .#minimal && \
|
||||||
mv $(realpath nvim-minimal.AppImage) neovim-x86_64-linux-minimal.AppImage && \
|
mv $(realpath nvim-minimal.AppImage) /out/neovim-x86_64-linux-minimal.AppImage
|
||||||
nix-collect-garbage
|
|
||||||
|
FROM scratch
|
||||||
|
WORKDIR /out
|
||||||
|
COPY --from=build /out /out
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue