-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5666fa5
commit ce39ac2
Showing
3 changed files
with
65 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,44 @@ | ||
on: push | ||
env: | ||
IMAGE_NAME: flovilmart/nvim | ||
jobs: | ||
build: | ||
runs-on: macos-11 | ||
docker: | ||
name: Docker build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install | ||
run: make | ||
- uses: actions/checkout@v4 | ||
- name: Set up SSH | ||
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # v3.1.0 | ||
with: | ||
host: github.com | ||
private-key: ${{ secrets.SSH_GITHUB_PPK }} | ||
private-key-name: github-ppk | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: 'arm64,arm' | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Setup vars | ||
run: | | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
[ "$VERSION" == "main" ] && VERSION=latest | ||
echo VERSION=$VERSION >> "$GITHUB_ENV" | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64,linux/arm64/v8 | ||
push: false | ||
ssh: default | ||
tags: | | ||
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM alpine:edge | ||
|
||
RUN apk add neovim curl bash openssh-client git | ||
|
||
RUN mkdir -p ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
RUN ln -sf /usr/bin/nvim /usr/bin/vi | ||
|
||
WORKDIR /root/src/flovilmart/vimrc | ||
|
||
COPY . . | ||
|
||
# Adds SSH keys to make sure we can clone submodules | ||
RUN --mount=type=ssh ./install.sh all | ||
RUN sed -i "s#/opt/homebrew/bin/nu#/bin/bash#" ./plugin/after/styling.lua | ||
|
||
|
||
CMD nu | ||
Check warning on line 17 in Dockerfile GitHub Actions / Docker buildJSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters