Skip to content

Commit

Permalink
ci: allow custom branch for hydra docker build (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Nov 8, 2024
1 parent da4e83d commit 078fe7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/hydra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ on:
paths:
- ".github/workflows/hydra.yml"
- "docker/dockerfile.hydra"
workflow_dispatch: {}
workflow_dispatch:
inputs:
HCP_BRANCH:
description: "Hydra Control Plane branch to build"
required: false
type: string
default: "main"

jobs:
build-images:
Expand Down Expand Up @@ -38,4 +44,7 @@ jobs:
file: ${{ matrix.file }}
platforms: linux/amd64
push: true
tags: ghcr.io/${{ matrix.endpoint }},ghcr.io/${{ matrix.endpoint }}:${{ github.sha }}
build-args: BRANCH=${{ github.event.inputs.HCP_BRANCH }}
tags:
ghcr.io/${{ matrix.endpoint }},ghcr.io/${{ matrix.endpoint }}:${{
github.sha }}
4 changes: 3 additions & 1 deletion docker/dockerfile.hydra
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
ARG RUST_VERSION=1.81.0
ARG BRANCH=main

FROM rust:${RUST_VERSION}-slim-bullseye AS build
WORKDIR /app

RUN apt-get update && apt-get install -y libssl-dev pkg-config git ca-certificates
RUN git clone https://github.com/cardano-scaling/hydra-control-plane.git
# RUN cd hydra-control-plane && git checkout chore/use-hydra-vk-instead-of-bytes
RUN cd hydra-control-plane && git checkout ${BRANCH}

WORKDIR /app/hydra-control-plane
RUN cargo build --locked --release
Expand Down

0 comments on commit 078fe7d

Please sign in to comment.