refactor: improved images for l-s and l-a-s

This commit is contained in:
Rafael Taranto 2024-08-09 11:03:43 +01:00
parent b9b532a633
commit 95df06250e
33 changed files with 137 additions and 749 deletions

View file

@ -1,19 +1,47 @@
name: build
on: [workflow_dispatch]
on: [ workflow_dispatch ]
jobs:
jobs:
everything:
runs-on: ubuntu-latest
steps:
- name: Get Repo
uses: actions/checkout@v2
- name: Run script
shell: bash
run: |
chmod +x ./build/ci-build.sh
./build/ci-build.sh
- uses: actions/upload-artifact@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
name: lamassu-server.tar.gz
path: ./lamassu-server.tar.gz
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-updatetar
restore-keys: |
${{ runner.os }}-buildx-updatetar
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: build-scripts/ci.Dockerfile
load: true
tags: ci_image:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Extract artifact from Docker image
run: |
docker create --name extract_artifact ci_image:latest
docker cp extract_artifact:/lamassu-server.tar.gz ./lamassu-server.tar.gz
docker rm extract_artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: update.tar
path: update.tar
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache