build #159
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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-scripts/Dockerfile.ci | |
load: true | |
tags: ci_image:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
build-args: | | |
NPM_TOKEN=${{ secrets.NPM_TOKEN }} | |
GPG_PASSPHRASE=${{ secrets.GPG_PASSPHRASE }} | |
- name: Extract artifact from Docker image | |
run: | | |
docker create --name extract_artifact ci_image:latest | |
docker cp extract_artifact:/lamassu/lamassu-machine/build/codebase/update.tar ./update.tar | |
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 |