Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support release filebeat to docker hub #93

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
33 changes: 31 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
goreleaser:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -28,4 +28,33 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.BEAT_ACCESS_TOKEN }}
GOPATH: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go
GOPATH: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta for filebeat
id: docker_meta_filebeat
uses: crazy-max/ghaction-docker-meta@v1
with:
images: |
streamnative/filebeat
tag-sha: true

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Build and push beat image
uses: docker/build-push-action@v2
with:
context: .
file: ./filebeat/Dockerfile
push: true
tags: ${{ steps.docker_meta_filebeat.outputs.tags }}
labels: ${{ steps.docker_meta_filebeat.outputs.labels }}
3 changes: 3 additions & 0 deletions filebeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM elastic/filebeat:7.17.5

COPY dist/filebeat_linux_amd64_v1/beat /usr/share/filebeat/filebeat