Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work on building containers in PR-Branches #160

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
name: Go Build
name: Build

on:
pull_request:

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: 1.23
# You can test your matrix by printing the current Go version
- name: Display Go version
run: go version
- name: Build it
run: make V=1
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: 1.23
# You can test your matrix by printing the current Go version
- name: Display Go version
run: go version
- name: Build it
run: make V=1
build-operator-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Build it
run: make V=1
- name: Extract metadata (Operator tags, labels) for Docker
id: meta_operator
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: ${{ env.REGISTRY }}/hyperspike/valkey-operator:${{ github.sha }}
- name: Build Operator image
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc
id: docker_build_operator
with:
file: Dockerfile.controller
context: .
push: false
visibility: public
tags: ${{ steps.meta_operator.outputs.images }}
labels: ${{ steps.meta_operator.outputs.labels }}
7 changes: 4 additions & 3 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VALKEY_VERSION: 8.0.1
VALKEY_VERSION: 8.0.2
RELEASE_VERSION: ${{ github.ref_name }}

jobs:
build-and-push-image:
Expand All @@ -40,7 +41,7 @@ jobs:
id: meta_controller
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ env.RELEASE_VERSION }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}
- name: Extract metadata (Sidecar tags, labels) for Docker
id: meta_sidecar
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
context: .
push: true
visibility: public
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ env.RELEASE_VERSION }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}
labels: ${{ steps.meta_manager.outputs.labels }}
- name: Build and push Sidecar image
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc
Expand Down
Loading