* Don't require BTC core connection * Docker: Don't clone, but use local repo * Add GitHub workflows * Allow to overwrite hostname * chore: update dependencies * Get tor URL from env
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: Build on push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
|
|
|
jobs:
|
|
build:
|
|
name: Build image
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
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
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
- 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: Show available Docker buildx platforms
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
|
|
- name: Run Docker buildx
|
|
run: |
|
|
docker buildx build \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
|
--platform ${{matrix.platform}} \
|
|
--tag ${{ secrets.DOCKER_CONTAINER_USERNAME }}/lndhub:$BRANCH \
|
|
--output "type=registry" ./ |