Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Package
run: make package

Expand All @@ -118,6 +124,9 @@ jobs:
env:
RELEASE_TAG: ${{ steps.github_tag.outputs.tag }}

- name: Build and push docker image
run: make docker-push

- name: Release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.26.1 as builder
FROM golang:1.26.1 AS builder

COPY . .

Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ chlog-update:
.PHONY: package
package: windows_amd64_build windows_arm64_build linux_amd64_build linux_arm64_build darwin_amd64_build darwin_arm64_build linux_ppc64le_build aix_ppc64_build

TAG := $(shell git describe --tags --exact-match 2> /dev/null \
|| git symbolic-ref -q --short HEAD \
|| git rev-parse --short HEAD)
.PHONY: docker
docker:
docker build --platform linux/amd64 -t ghcr.io/splunk/tarunner:main .
docker build --platform linux/amd64 -t docker.io/library/splunk/tarunner:$(TAG) .

.PHONY: docker-push
docker-push: docker
docker push docker.io/library/splunk/tarunner:$(TAG)