-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.37 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build latest Docker image
on:
push:
branches:
- master
workflow_dispatch:
env:
DOCKER_CLI_EXPERIMENTAL: enabled
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Environment
run: |
docker buildx create --name arm_builder --driver docker-container
docker buildx use arm_builder
docker run --rm --privileged tonistiigi/binfmt --install all
- name: Build Docker image
id: build
run: |
export DIR_TMP="$(mktemp -d)"
git clone -b master https://github.com/flydog-sdr/docker-builder ${DIR_TMP}/docker-builder
cd ${DIR_TMP}/docker-builder/flycat-sdr
docker buildx build --platform linux/arm/v7 -t flycat-sdr -o type=docker -f ./Dockerfile .
echo "::set-output name=status::success"
- name: Push to registry
if: steps.build.outputs.status == 'success'
env:
REGISTRY_USERNAME_DOCKERHUB: ${{ secrets.REGISTRY_USERNAME_DOCKERHUB }}
REGISTRY_PASSWORD_DOCKERHUB: ${{ secrets.REGISTRY_PASSWORD_DOCKERHUB }}
run: |
docker tag flycat-sdr ${REGISTRY_USERNAME_DOCKERHUB}/flycat-sdr:latest
echo ${REGISTRY_PASSWORD_DOCKERHUB} | docker login --username ${REGISTRY_USERNAME_DOCKERHUB} --password-stdin
docker push ${REGISTRY_USERNAME_DOCKERHUB}/flycat-sdr:latest