Skip to content
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
57 changes: 57 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Docker Image Build

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

env:
REGISTRY: quay.io
IMAGE: quay.io/stackmon/metrics-processor

jobs:
build:
if: github.event.pull_request.merged != true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v7
with:
context: .
target: metrics-processor
push: false

push_if_merged:
Comment on lines +17 to +33
# The tag is pinned by stackmon-config/config.yaml, keep change_<pr>_latest.
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
target: metrics-processor
push: true
tags: ${{ env.IMAGE }}:change_${{ github.event.pull_request.number }}_latest
Comment on lines +35 to +57
33 changes: 0 additions & 33 deletions zuul.yaml

This file was deleted.

Loading