From 79a2dc6e143c4ca600da004a3f5017fc7370a4ae Mon Sep 17 00:00:00 2001 From: iofq Date: Fri, 12 May 2023 04:52:53 -0500 Subject: [PATCH] add CI --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++++++++++++ Dockerfile | 7 +++++++ nvim-x86_64.AppImage | 1 + 3 files changed, 50 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 Dockerfile create mode 120000 nvim-x86_64.AppImage diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..35272c8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - + name: Login to ghcr.io + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build container and push to ghcr.io + uses: docker/build-push-action@v2 + with: + push: true + tags: ghcr.io/iofq/nvim:latest + - + name: Extract .tar.gz from container + uses: shrink/actions-docker-extract@v1 + id: extract + with: + image: ghcr.io/iofq/nvim:latest + path: /root/term.tgz + - + name: Upload archive to release + uses: xresloader/upload-to-github-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: ${{ steps.extract.outputs.destination }} + update_latest_release: true + overwrite: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..777fa8c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM nixos/nix + +ADD . + +RUN nix bundle --bundler github:ralismark/nix-appimage . + +ENTRYPOINT [ "nvim-x86_64.AppImage" ] diff --git a/nvim-x86_64.AppImage b/nvim-x86_64.AppImage new file mode 120000 index 0000000..890fb29 --- /dev/null +++ b/nvim-x86_64.AppImage @@ -0,0 +1 @@ +/nix/store/3dyh4jbvp9rj0wdyxapf514fz4s76xpl-nvim-x86_64.AppImage \ No newline at end of file