Skip to content

Commit

Permalink
[FEAT] docker ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Aug 28, 2023
1 parent e50a7fb commit db09b3e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 78 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
with:
make: openapi

# docker:
# uses: ./.github/workflows/docker.yml

regtest:
needs: [ lint ]
uses: ./.github/workflows/regtest.yml
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
name: docker

on:
push: main
workflow_call:
inputs:
tag:
default: latest
type: string

jobs:
docker:
push_to_dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: false
tags: lnbitsdocker/lnbits-legend:latest
cache-from: type=registry,ref=lnbitsdocker/lnbits-legend:latest
cache-to: type=inline
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/lnbits:${{ inputs.tag }}
platforms: [ linux/amd64, linux/arm64 ]
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
69 changes: 0 additions & 69 deletions .github/workflows/on-tag.yml

This file was deleted.

0 comments on commit db09b3e

Please sign in to comment.