-
Notifications
You must be signed in to change notification settings - Fork 134
57 lines (47 loc) · 1.87 KB
/
datanode-dev-image.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
---
name: "Data Node DEV Image"
on:
workflow_dispatch:
jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Set up QEMU"
uses: "docker/setup-qemu-action@v2"
- name: "Set up Docker Buildx"
uses: "docker/setup-buildx-action@v2"
- name: "Get build args"
shell: "bash"
run: |
for arch in x64 aarch64; do
curl -o manifest-linux-${arch}.json -fsSL \
-G -d limit=1 -d artifact=graylog-datanode-linux-${arch} \
https://downloads.graylog.org/nightly-builds
done
echo "SNAPSHOT_URL_X64=$(jq -r '.artifacts[].url' manifest-linux-x64.json)" | tee -a "$GITHUB_ENV"
echo "SNAPSHOT_URL_AARCH64=$(jq -r '.artifacts[].url' manifest-linux-aarch64.json)" | tee -a "$GITHUB_ENV"
echo "SNAPSHOT_VERSION=$(jq -r '.artifacts[].version' manifest-linux-x64.json)" | tee -a "$GITHUB_ENV"
echo "BUILD_DATE=$(TZ=UTC date '+%FT%T%Z')" | tee -a "$GITHUB_ENV"
echo "VCS_REF=$(git rev-parse HEAD)" | tee -a "$GITHUB_ENV"
- name: "Login to Docker Hub"
uses: "docker/login-action@v2"
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: "Build and push image"
uses: "docker/build-push-action@v4"
with:
context: "."
file: "docker/datanode/Dockerfile"
platforms: "linux/amd64,linux/arm64"
pull: true
push: true
tags: "graylog/graylog-datanode:5.2-dev"
build-args: |
SNAPSHOT_URL_X64=${{ env.SNAPSHOT_URL_X64 }}
SNAPSHOT_URL_AARCH64=${{ env.SNAPSHOT_URL_AARCH64 }}
GRAYLOG_VERSION=${{ env.SNAPSHOT_VERSION }}
BUILD_DATE=${{ env.BUILD_DATE }}
VCS_REF=${{ env.VCS_REF }}