Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Jun 27, 2024
1 parent e46255e commit 346730d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-env-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@

name: Create and publish a Docker image for bindings build environment

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['fix-docker-workflow']

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
concurrency:
group: docker-build
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ghcr.io/sourcegraph/scip-bindings-env

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
docker_release_build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,14 +57,14 @@ jobs:

- name: Build and push by digest
id: build
uses: docker/build-push-action@v4
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: dev/Dockerfile.bindings
push: true
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=${{ env.IMAGE_NAME}}:main
cache-from: type=registry,ref=${{ env.IMAGE_NAME}}:latest
cache-to: type=inline

- name: Export digest
Expand Down
40 changes: 20 additions & 20 deletions dev/Dockerfile.bindings
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git $HOME/.asdf && \
RUN . ~/.bashrc

# YOLO
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

ENV PATH="${PATH}:/asdf/.ghcup/bin"

RUN asdf plugin add nodejs && \
asdf plugin add golang && \
asdf plugin add shellcheck && \
asdf plugin add yarn && \
asdf plugin add python && \
asdf plugin add rust

COPY .tool-versions .

RUN asdf install && \
# Pre-fetch Haskell dependencies as they take the longest time by far
# TODO(anton): run the proto-generate.sh script during the build time to
# pre-fecth all dependencies. I attempted to do so but ran into issues
# with Yarn
cabal install proto-lens-protoc-0.8.0.1 ghc-source-gen-0.4.5.0

# RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
#
# ENV PATH="${PATH}:/asdf/.ghcup/bin"
#
# RUN asdf plugin add nodejs && \
# asdf plugin add golang && \
# asdf plugin add shellcheck && \
# asdf plugin add yarn && \
# asdf plugin add python && \
# asdf plugin add rust
#
# COPY .tool-versions .
#
# RUN asdf install && \
# # Pre-fetch Haskell dependencies as they take the longest time by far
# # TODO(anton): run the proto-generate.sh script during the build time to
# # pre-fecth all dependencies. I attempted to do so but ran into issues
# # with Yarn
# cabal install proto-lens-protoc-0.8.0.1 ghc-source-gen-0.4.5.0
#
WORKDIR /src

CMD ["./dev/docker-entrypoint.sh"]
Expand Down

0 comments on commit 346730d

Please sign in to comment.