hledger/.github/workflows/static-linux-arm32v7.yml
Garret McGraw 3d0afd5444
Static builds for Linux on x64 (amd64) and arm32v7 architectures (#1571)
Adding new CI workflows building static executables for linux, both intel 64-bit and ARM32v7. 

These will be useful for providing hledger on Nextcloud, and also as general linux executables, more robust than the ubuntu executable we have been providing.
2021-06-30 18:05:27 -10:00

54 lines
1.5 KiB
YAML

name: Static build arm32v7 arch CI
on:
push:
branches: [ ci-linux-static-arm32 ]
#tags:
# - '[0-9]+.[0-9]+'
# - '[0-9]+.[0-9]+-*'
# - '[0-9]+.[0-9]+.[0-9]+'
# - '[0-9]+.[0-9]+.[0-9]+-*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./docker-static-arm32v7/Dockerfile
platforms: linux/arm
tags: hledger-static-linux-arm32v7:latest
load: true
- name: Extract binaries from docker
run: |
# Create temporary container from it
container_id=$(docker create hledger-static-linux-arm32v7:latest)
# Copy stuff from temp container
docker cp $container_id:/root/hledger /tmp/hledger-static-linux-arm32v7
# Delete temp container
docker rm -v $container_id
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: Static Binary
path: /tmp/hledger-static-linux-arm32v7
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: /tmp/hledger-static-linux-arm32v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}