Skip to content

Commit

Permalink
Docker build sha
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Sep 6, 2022
1 parent bb6d17d commit bf536ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
key: ${{ runner.os }}-buildx-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-docker-
- name: Show GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Build Docker Image
uses: docker/build-push-action@v3
with:
Expand All @@ -57,6 +61,8 @@ jobs:
file: ./Dockerfile
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
build-args: |
GIT-SHA=${{ github.sha }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"

# Install DKV (Skipped for CI Pipelines)
ARG CI
RUN if [ -z "$CI" ] ; then git clone --depth=1 https://github.com/flipkart-incubator/dkv.git \
ARG GIT-SHA=master

RUN if [ -z "$CI" ] ; then git clone --depth=1 --branch $GIT-SHA https://github.com/flipkart-incubator/dkv.git \
&& cd dkv && GOOS=linux GOARCH=$(dpkg --print-architecture | awk -F'-' '{print $NF}') make build \
&& mv ./bin /usr/local/dkv && chown -R root:root /usr/local/dkv; fi

Expand Down

0 comments on commit bf536ca

Please sign in to comment.