Skip to content

poc(metricsforwarder): Use multiapps deploy to run metricsforwarder on cf #2229

poc(metricsforwarder): Use multiapps deploy to run metricsforwarder on cf

poc(metricsforwarder): Use multiapps deploy to run metricsforwarder on cf #2229

Workflow file for this run

name: Create and publish a Docker image
on:
push:
branches: ['main']
paths:
- 'ci/dockerfiles/**'
- '.github/workflows/image.yml'
- '.tool-versions'
pull_request:
paths:
- 'ci/dockerfiles/**'
- '.github/workflows/image.yml'
- '.tool-versions'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
strategy:
matrix:
image_suffix: ["tools"]
name: Build and Push app-autoscaler-release-${{ matrix.image_suffix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }}
- name: Get ginkgo version from autoscaler-release
id: ginkgo
run: |
version=$(grep "ginkgo " .tool-versions| cut -f 2 -d " ")
echo "GINKGO version from .tool-versions: \'${version}\'"
echo "version=${version}" >> "$GITHUB_OUTPUT"
- id: get-golang-version
shell: bash
run: |
version=$(grep "golang " .tool-versions| cut -f 2 -d " ")
echo "Go version from .tool-versions: \'${version}\'"
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v5
with:
context: ci/dockerfiles/autoscaler-${{ matrix.image_suffix }}
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }}:main
build-args: |
GINKGO_VERSION=v${{ steps.ginkgo.outputs.version }}
GO_VERSION=${{ steps.get-golang-version.outputs.version }}