Skip to content

Data Node DEV Image #13

Data Node DEV Image

Data Node DEV Image #13

---
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 }}