Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit cef2084

Browse files
committed
1 parent dbd12ae commit cef2084

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

.github/workflows/docker.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v2
14+
- name: Set up metadata
15+
id: meta
16+
uses: docker/metadata-action@v3
17+
with:
18+
images: pojntfx/liwasc-backend
19+
tags: type=semver,pattern={{version}}
1420
- name: Set up QEMU
1521
uses: docker/setup-qemu-action@v1
1622
- name: Set up Docker Buildx
@@ -20,20 +26,32 @@ jobs:
2026
with:
2127
username: ${{ secrets.DOCKER_USERNAME }}
2228
password: ${{ secrets.DOCKER_TOKEN }}
23-
- name: Build latest image
29+
- name: Build image
2430
uses: docker/build-push-action@v2
2531
with:
2632
context: .
2733
file: ./Dockerfile
2834
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
2935
push: false
30-
tags: pojntfx/liwasc-backend:latest
31-
- name: Push latest image
36+
tags: pojntfx/liwasc-backend:unstable
37+
labels: ${{ steps.meta.outputs.labels }}
38+
- name: Push pre-release image to Docker Hub
3239
if: ${{ github.ref == 'refs/heads/main' }}
3340
uses: docker/build-push-action@v2
3441
with:
3542
context: .
3643
file: ./Dockerfile
3744
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
3845
push: true
39-
tags: pojntfx/liwasc-backend:latest
46+
tags: pojntfx/liwasc-backend:unstable
47+
labels: ${{ steps.meta.outputs.labels }}
48+
- name: Push release image to Docker Hub
49+
if: startsWith(github.ref, 'refs/tags/v')
50+
uses: docker/build-push-action@v2
51+
with:
52+
context: .
53+
file: ./Dockerfile
54+
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
55+
push: true
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/hydrun.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,27 @@ jobs:
2323
run: hydrun -a amd64,arm64,arm/v7 ./Hydrunfile
2424
- name: Build frontend with hydrun
2525
run: hydrun "./Hydrunfile frontend"
26-
- name: Publish to GitHub releases
26+
- name: Publish pre-release to GitHub releases
2727
if: ${{ github.ref == 'refs/heads/main' }}
2828
uses: marvinpinto/action-automatic-releases@latest
2929
with:
3030
repo_token: "${{ secrets.GITHUB_TOKEN }}"
31-
automatic_release_tag: "latest"
31+
automatic_release_tag: unstable
32+
prerelease: true
33+
files: |
34+
out/release/liwasc-backend/*
35+
out/release/liwasc-frontend/*
36+
- name: Publish release to GitHub releases
37+
if: startsWith(github.ref, 'refs/tags/v')
38+
uses: marvinpinto/action-automatic-releases@latest
39+
with:
40+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
3241
prerelease: false
3342
files: |
3443
out/release/liwasc-backend/*
3544
out/release/liwasc-frontend/*
36-
- name: Publish to GitHub pages
37-
if: ${{ github.ref == 'refs/heads/main' }}
45+
- name: Publish release to GitHub pages
46+
if: startsWith(github.ref, 'refs/tags/v')
3847
uses: JamesIves/[email protected]
3948
with:
4049
branch: gh-pages

Hydrunfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Install native dependencies
44
apt update
5-
apt install -y curl make sudo build-essential sqlite3 libprotobuf-dev protobuf-compiler libpcap-dev
5+
apt install -y curl make sudo build-essential sqlite3 protobuf-compiler libpcap-dev
66

77
# Fix certificate authorities on armv7
88
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ List, wake and scan nodes in a network.
88
[![Docker CI](https://github.com/pojntfx/liwasc/actions/workflows/docker.yaml/badge.svg)](https://github.com/pojntfx/liwasc/actions/workflows/docker.yaml)
99
[![Go Reference](https://pkg.go.dev/badge/github.com/pojntfx/liwasc.svg)](https://pkg.go.dev/github.com/pojntfx/liwasc)
1010
[![Matrix](https://img.shields.io/matrix/liwasc:matrix.org)](https://matrix.to/#/#liwasc:matrix.org?via=matrix.org)
11+
[![Docker Pulls](https://img.shields.io/docker/pulls/pojntfx/liwasc-backend?label=docker%20pulls)](https://hub.docker.com/r/pojntfx/liwasc-backend)
12+
[![Binary Downloads](https://img.shields.io/github/downloads/pojntfx/liwasc/total?label=binary%20downloads)](https://github.com/pojntfx/liwasc/releases)
1113

1214
## Overview
1315

@@ -38,7 +40,7 @@ If you prefer a native installation, static binaries are also available on [GitH
3840
You can install them like so:
3941

4042
```shell
41-
$ curl -L -o /tmp/liwasc-backend https://github.com/pojntfx/liwasc/releases/download/latest/liwasc-backend.linux-$(uname -m)
43+
$ curl -L -o /tmp/liwasc-backend https://github.com/pojntfx/liwasc/releases/latest/download/liwasc-backend.linux-$(uname -m)
4244
$ sudo install /tmp/liwasc-backend /usr/local/bin
4345
$ sudo setcap cap_net_raw+ep /usr/local/bin/liwasc-backend # This allows rootless execution
4446
```

0 commit comments

Comments
 (0)