forked from knoopx/alpine-raspberry-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (21 loc) · 918 Bytes
/
main.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
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
docker build runner -t runner
docker run --privileged --rm -v /dev:/dev:ro -v "$PWD":/runner -w /runner -e ALPINE_BRANCH=edge -e ALPINE_MIRROR="http://dl-cdn.alpinelinux.org/alpine" -e ARCH=aarch64 runner ./make-image
docker run --privileged --rm -v /dev:/dev:ro -v "$PWD":/runner -w /runner -e ALPINE_BRANCH=edge -e ALPINE_MIRROR="http://dl-cdn.alpinelinux.org/alpine" -e ARCH=armhf runner ./make-image
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo snap install hub --classic
build_date=$(date +%Y-%m-%d)
build_number=$[$(git tag | grep $build_date | wc -l) + 1]
tag="$build_date.$build_number"
hub release create $tag -m "$tag" $(find . -name '*.gz' -exec echo -n '-a {} ' \;)