mirror of
https://github.com/prometheus-community/elasticsearch_exporter.git
synced 2026-02-06 10:58:13 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...8e8c483db84b4bee98b60c0593521ed34d9990e8) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
108 lines
4.2 KiB
YAML
108 lines
4.2 KiB
YAML
---
|
|
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
test_go:
|
|
name: Go tests
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
# Whenever the Go version is updated here, .promu.yml
|
|
# should also be updated.
|
|
image: quay.io/prometheus/golang-builder:1.25-base
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: prometheus/promci@c0916f0a41f13444612a8f0f5e700ea34edd7c19 # v0.5.3
|
|
- uses: ./.github/promci/actions/setup_environment
|
|
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
|
|
|
|
build:
|
|
name: Build Prometheus for common architectures
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
|
|
&&
|
|
!(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
|
|
&&
|
|
!(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
|
|
&&
|
|
!(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
|
|
strategy:
|
|
matrix:
|
|
thread: [ 0, 1, 2 ]
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: prometheus/promci@c0916f0a41f13444612a8f0f5e700ea34edd7c19 # v0.5.3
|
|
- uses: ./.github/promci/actions/build
|
|
with:
|
|
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
|
|
parallelism: 3
|
|
thread: ${{ matrix.thread }}
|
|
|
|
build_all:
|
|
name: Build Prometheus for all architectures
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
|
|
||
|
|
(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
|
|
||
|
|
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
|
|
||
|
|
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
|
|
strategy:
|
|
matrix:
|
|
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
|
|
|
|
# Whenever the Go version is updated here, .promu.yml
|
|
# should also be updated.
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: prometheus/promci@c0916f0a41f13444612a8f0f5e700ea34edd7c19 # v0.5.3
|
|
- uses: ./.github/promci/actions/build
|
|
with:
|
|
parallelism: 12
|
|
thread: ${{ matrix.thread }}
|
|
|
|
publish_main:
|
|
# https://github.com/prometheus/promci/blob/52c7012f5f0070d7281b8db4a119e21341d43c91/actions/publish_main/action.yml
|
|
name: Publish main branch artifacts
|
|
runs-on: ubuntu-latest
|
|
needs: [test_go, build_all]
|
|
if: |
|
|
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
|
|
||
|
|
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: prometheus/promci@c0916f0a41f13444612a8f0f5e700ea34edd7c19 # v0.5.3
|
|
- uses: ./.github/promci/actions/publish_main
|
|
with:
|
|
docker_hub_organization: prometheuscommunity
|
|
docker_hub_login: ${{ secrets.docker_hub_login }}
|
|
docker_hub_password: ${{ secrets.docker_hub_password }}
|
|
quay_io_organization: prometheuscommunity
|
|
quay_io_login: ${{ secrets.quay_io_login }}
|
|
quay_io_password: ${{ secrets.quay_io_password }}
|
|
|
|
publish_release:
|
|
name: Publish release artefacts
|
|
runs-on: ubuntu-latest
|
|
needs: [test_go, build_all]
|
|
if: |
|
|
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: prometheus/promci@c0916f0a41f13444612a8f0f5e700ea34edd7c19 # v0.5.3
|
|
- uses: ./.github/promci/actions/publish_release
|
|
with:
|
|
docker_hub_organization: prometheuscommunity
|
|
docker_hub_login: ${{ secrets.docker_hub_login }}
|
|
docker_hub_password: ${{ secrets.docker_hub_password }}
|
|
quay_io_organization: prometheuscommunity
|
|
quay_io_login: ${{ secrets.quay_io_login }}
|
|
quay_io_password: ${{ secrets.quay_io_password }}
|
|
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}
|