fix(build): Run abuild-keygen via runuser too #7
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: | |
release: | |
types: [created] | |
push: | |
pull_request: | |
types: [opened, edited] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: amd64 | |
- arch: x86 | |
- arch: armhf | |
- arch: arm64 | |
name: Build on ${{ matrix.arch }} | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup Docker | |
run: | | |
docker run --rm --privileged multiarch/qemu-user-static:register --reset | |
- name: Build in Docker | |
run: | | |
docker run --workdir /github/workspace --rm --entrypoint "./.github/scripts/build.sh" -v "$(pwd)":"/github/workspace" multiarch/alpine:${{ matrix.arch }}-edge | |
- name: Upload Binary | |
if: github.event_name != 'release' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dpitunnel-cli-${{ matrix.arch }} | |
path: build/DPITunnel-cli-exec | |
- name: Upload Binary to Release | |
if: github.event_name == 'release' | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/DPITunnel-cli-exec | |
asset_name: dpitunnel-cli-${{ matrix.arch }} | |
tag: ${{ github.ref }} |