Skip to content

Commit

Permalink
rework dockerfile to include build, add feature/parquet as a branch t…
Browse files Browse the repository at this point in the history
…rigger to github action
  • Loading branch information
coutug committed Nov 11, 2024
1 parent fe1f5e2 commit f0a81d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- master
- develop
- feature/parquet

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -38,9 +39,6 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Build Binary
run: go build -v -o substreams-sink-files ./cmd/substreams-sink-files

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
Expand Down Expand Up @@ -68,16 +66,3 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
# org.opencontainers.image.version will match the tag name
labels: ${{ steps.meta.outputs.labels }}

slack-notifications:
needs: [build]
runs-on: ubuntu-20.04
steps:
- name: Slack notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: Ilshidur/[email protected]
with:
args: |
:done: *${{ github.repository }}* Success building docker images from ${{ github.ref_type }} _${{ github.ref_name }}_ (${{ github.actor }}) :sparkling_heart: ```${{ join(needs.build.outputs.tags, ' ') }}```
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# syntax=docker/dockerfile:1.2

FROM golang:1.23.3-alpine3.20 AS build

WORKDIR /build

COPY . .

RUN go build -v -o substreams-sink-files ./cmd/substreams-sink-files

FROM ubuntu:20.04

WORKDIR /app

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
ca-certificates libssl1.1 vim strace lsof curl jq && \
rm -rf /var/cache/apt /var/lib/apt/lists/*

ADD /substreams-sink-files /app/substreams-sink-files
COPY --from=build /build/substreams-sink-files .

ENV PATH "/app:$PATH"

Expand Down

0 comments on commit f0a81d2

Please sign in to comment.