mirror of
https://github.com/bumi/lntip
synced 2024-09-20 21:34:27 +00:00
commit
6f2b72caa7
43
.github/workflows/on-push.yml
vendored
Normal file
43
.github/workflows/on-push.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Build on push
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build image
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout project
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set env variables
|
||||||
|
run: |
|
||||||
|
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" >> $GITHUB_ENV
|
||||||
|
IMAGE_NAME="${GITHUB_REPOSITORY#*/}"
|
||||||
|
echo "IMAGE_NAME=${IMAGE_NAME//docker-/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
id: qemu
|
||||||
|
|
||||||
|
- name: Setup Docker buildx action
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
id: buildx
|
||||||
|
|
||||||
|
- name: Run Docker buildx
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--tag ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:$BRANCH \
|
||||||
|
--output "type=registry" ./
|
43
.github/workflows/on-tag.yml
vendored
Normal file
43
.github/workflows/on-tag.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Build on tag
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v[0-9]+.[0-9]+.[0-9]+
|
||||||
|
- v[0-9]+.[0-9]+.[0-9]+-*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build image
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout project
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set env variables
|
||||||
|
run: |
|
||||||
|
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||||
|
IMAGE_NAME="${GITHUB_REPOSITORY#*/}"
|
||||||
|
echo "IMAGE_NAME=${IMAGE_NAME//docker-/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
id: qemu
|
||||||
|
|
||||||
|
- name: Setup Docker buildx action
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
id: buildx
|
||||||
|
|
||||||
|
- name: Run Docker buildx
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--tag ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:$BRANCH \
|
||||||
|
--output "type=registry" ./
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Go base image
|
||||||
|
FROM golang:1.17-alpine as builder
|
||||||
|
|
||||||
|
RUN go get github.com/GeertJohan/go.rice && go get github.com/GeertJohan/go.rice/rice
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go install
|
||||||
|
|
||||||
|
RUN rice embed-go && go build
|
||||||
|
|
||||||
|
FROM alpine:3.14
|
||||||
|
|
||||||
|
COPY --from=builder /app/lnme /lnme
|
||||||
|
|
||||||
|
EXPOSE 1323
|
||||||
|
|
||||||
|
CMD ["/lnme"]
|
@ -39,6 +39,12 @@ There are no other dependencies. Simply download the binary and run it!
|
|||||||
|
|
||||||
Note: You must have [go.rice installed](https://github.com/GeertJohan/go.rice#installation)
|
Note: You must have [go.rice installed](https://github.com/GeertJohan/go.rice#installation)
|
||||||
|
|
||||||
|
### Running in Docker
|
||||||
|
|
||||||
|
LnMe is now available in docker too.
|
||||||
|
You can start LnMe like this: `docker run -it --rm ghcr.io/bumi/lnme:master`
|
||||||
|
A list of existing tags is available [here](https://github.com/bumi/lnme/pkgs/container/lnme).
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
#### LND configuration
|
#### LND configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user