diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dd4c1eb8..7a856986c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/filebeat/Dockerfile b/filebeat/Dockerfile new file mode 100644 index 000000000..6ba628299 --- /dev/null +++ b/filebeat/Dockerfile @@ -0,0 +1,3 @@ +FROM elastic/filebeat:7.17.5 + +COPY dist/filebeat_linux_amd64_v1/beat /usr/share/filebeat/filebeat \ No newline at end of file