Skip to content

Commit

Permalink
Support release filebeat (#100)
Browse files Browse the repository at this point in the history
* Support release filebeat

* Debug docker release

* Fixed release file

* Fixed release

* Fixed dockerfile

* Fixed github action

* Update action script

* fix release

* fix permission

* fix release workflow

* remove tag-sha

* update filebeat docker file

---------

Co-authored-by: guangning <guangning@streamnative.io>
  • Loading branch information
jiangpengcheng and tuteng authored Aug 2, 2024
1 parent 96dac9c commit aa26b14
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
33 changes: 29 additions & 4 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 @@ -25,7 +25,32 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.BEAT_ACCESS_TOKEN }}
GOPATH: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
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
- 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 }}
10 changes: 10 additions & 0 deletions filebeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM elastic/filebeat:7.17.5

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

USER root

RUN mkdir -p /usr/share/filebeat/config /usr/share/filebeat/secret && \
chown -R filebeat:filebeat /usr/share/filebeat

USER filebeat

0 comments on commit aa26b14

Please sign in to comment.