chore: re-add build files

This commit is contained in:
Rafael Taranto 2025-04-11 08:34:12 +01:00
parent af8ecb7043
commit 20cf4dadce
2 changed files with 78 additions and 0 deletions

45
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: build
on: [ workflow_dispatch ]
jobs:
everything:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
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/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: lamassu-server.tar.gz
path: lamassu-server.tar.gz
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache