-
Notifications
You must be signed in to change notification settings - Fork 25
82 lines (67 loc) · 2.3 KB
/
publish-next.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Publish Next
on:
repository_dispatch:
types: [new-snmp-profiles]
push:
branches:
- next
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set Version
run: |
echo KENTIK_KTRANSLATE_VERSION=`date +"kt-%Y-%m-%d-${GITHUB_RUN_ID}"` >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.22.6'
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay.IO
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_LOGIN_TOKEN }}
- name: Install dependencies
run: sudo apt-get install make libpcap-dev
- name: Run build
run: |
echo ${{ env.KENTIK_KTRANSLATE_VERSION }}
KENTIK_KTRANSLATE_VERSION=${{ env.KENTIK_KTRANSLATE_VERSION }} make
- name: Run vet
run: |
go vet .
- name: Run testing
run: make test
- name: Build and Publish Docker
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: kentik/ktranslate:${{ env.KENTIK_KTRANSLATE_VERSION }}, kentik/ktranslate:next, quay.io/kentik/ktranslate:next, quay.io/kentik/ktranslate:${{ env.KENTIK_KTRANSLATE_VERSION }}
build-args: |
MAXMIND_LICENSE_KEY=${{ secrets.MM_DOWNLOAD_KEY }}
YOUR_ACCOUNT_ID=${{ secrets.MM_ACCOUNT_ID }}
KENTIK_KTRANSLATE_VERSION=${{ env.KENTIK_KTRANSLATE_VERSION }}
secrets: |
MAXMIND_LICENSE_KEY=${{ secrets.MM_DOWNLOAD_KEY }}
- name: Publish binary
uses: actions/upload-artifact@v4
with:
name: ktranslate
path: bin/ktranslate