Skip to content

Build and release

Build and release #59

Workflow file for this run

name: Build and release
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Git commit hash
id: hash
run: |
echo "speculosHash=$(git ls-remote https://github.com/LedgerHQ/speculos | head -n 1 | awk '{print $1}')" >> $GITHUB_OUTPUT
echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU # to build multitarget containers
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: src
platforms: linux/amd64,linux/arm64
push: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'workflow_dispatch' }}
tags: >-
zondax/builder-zemu:${{ steps.hash.outputs.hash }},
zondax/builder-zemu:latest,
zondax/builder-zemu:speculos-${{ steps.hash.outputs.speculosHash }}