Skip to content

feat (ci): pass in rancher monitoring version #165

feat (ci): pass in rancher monitoring version

feat (ci): pass in rancher monitoring version #165

Workflow file for this run

name: "[prom-fed] ci"
on:
workflow_call:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'Makefile'
push:
branches:
- main
- release/v[0-9]+.x
- release/v[0-9]+.[0-9]+.[0-9]+
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
env:
YQ_VERSION : v4.25.1
CGO_ENABLED : 0
jobs:
build:
strategy:
matrix:
arch:
- x64
- arm64
runs-on: ${{ github.repository == 'rancher/prometheus-federator' && format('runs-on,image=ubuntu22-full-{1},runner=4cpu-linux-{1},run-id={0}', github.run_id, matrix.arch) || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name : Set up Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: '1.22'
- name: Check if yq is installed
id: check_yq
run: |
if ! command -v yq &> /dev/null; then
echo "yq not found, installing..."
echo "::set-output name=install_yq::true"
else
echo "yq is already installed"
echo "::set-output name=install_yq::false"
fi
- name : Install YQ
if: steps.check_yq.outputs.install_yq == 'true'
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }} -O /usr/bin/yq && sudo chmod +x /usr/bin/yq;
- name : Install helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run CI
run: make ci