Skip to content

Commit 6fb803f

Browse files
committed
Migrate from CircleCI to GitHub Actions.
1 parent 13e38dd commit 6fb803f

File tree

3 files changed

+88
-43
lines changed

3 files changed

+88
-43
lines changed

.circleci/config.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v2
17+
18+
-
19+
name: Run tests
20+
run: docker-compose run --rm chirpstack-gateway-bridge make test
21+
22+
dist:
23+
needs: test
24+
runs-on: ubuntu-latest
25+
if: startsWith(github.ref, 'refs/tags/v')
26+
steps:
27+
-
28+
name: Checkout
29+
uses: actions/checkout@v2
30+
-
31+
name: Configure AWS credentials
32+
uses: aws-actions/configure-aws-credentials@v1
33+
with:
34+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
35+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36+
aws-region: eu-west-1
37+
-
38+
name: Build distributable binaries
39+
run: docker-compose run --rm chirpstack-gateway-bridge make dist
40+
-
41+
name: Upload binaries to S3
42+
if: startsWith(github.ref, 'refs/tags/v')
43+
run: |
44+
aws s3 sync dist/upload s3://builds.loraserver.io/chirpstack-gateway-bridge
45+
46+
docker:
47+
needs: test
48+
runs-on: ubuntu-latest
49+
if: startsWith(github.ref, 'refs/tags/v')
50+
steps:
51+
-
52+
name: Checkout
53+
uses: actions/checkout@v2
54+
-
55+
name: Docker meta
56+
id: meta
57+
uses: docker/metadata-action@v3
58+
with:
59+
images: |
60+
chirpstack/chirpstack-gateway-bridge
61+
tags: |
62+
type=semver,pattern={{version}}
63+
type=semver,pattern={{major}}
64+
type=semver,pattern={{major}}.{{minor}}
65+
-
66+
name: Set up QEMU
67+
uses: docker/setup-qemu-action@v1
68+
-
69+
name: Set up Docker Buildx
70+
uses: docker/setup-buildx-action@v1
71+
-
72+
name: Login to DockerHub
73+
uses: docker/login-action@v1
74+
with:
75+
username: ${{ secrets.DOCKERHUB_USERNAME }}
76+
password: ${{ secrets.DOCKERHUB_TOKEN }}
77+
-
78+
name: Build and push
79+
id: docker_build
80+
uses: docker/build-push-action@v2
81+
with:
82+
context: .
83+
push: true
84+
tags: ${{ steps.meta.output.tags }}
85+
-
86+
name: Image digest
87+
run: echo ${{ steps.docker_build.outputs.digest }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ChirpStack Gateway Bridge
22

3-
[![CircleCI](https://circleci.com/gh/brocaar/chirpstack-gateway-bridge.svg?style=svg)](https://circleci.com/gh/brocaar/chirpstack-gateway-bridge)
3+
![Tests](https://github.com/brocaar/chirpstack-gateway-bridge/actions/workflows/main.yml/badge.svg?branch=master)
44

55
ChirpStack Gateway Bridge is a service which converts LoRa<sup>&reg;</sup> Packet Forwarder protocols
66
into a ChirpStack Network Server [common data-format](https://github.com/brocaar/chirpstack-api/blob/master/protobuf/gw/gw.proto) (JSON and Protobuf).

0 commit comments

Comments
 (0)