Skip to content

Merge remote-tracking branch 'origin' into testnet-alpha-1 #53

Merge remote-tracking branch 'origin' into testnet-alpha-1

Merge remote-tracking branch 'origin' into testnet-alpha-1 #53

name: Docker (Build & Publish)
on:
push:
# TODO: enable for main only after testnet
branches:
- testnet-*
paths:
- core/**
- etc/**
- lib/**
- services/**
- Cargo.*
- .github/workflows/docker-build-publish.yml
- Dockerfile
workflow_dispatch:
env:
REGISTRY: ghcr.io
LIGHTNING_IMAGE_NAME: ${{ github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:master
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.LIGHTNING_IMAGE_NAME }}
tags: |
type=sha
type=ref,event=branch
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max