Skip to content

Synchronize common files from prometheus/prometheus #109

Synchronize common files from prometheus/prometheus

Synchronize common files from prometheus/prometheus #109

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches: [main, master, 'release-*']
tags: ['v*']
permissions:
contents: read
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.26-base
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
- run: git diff --exit-code
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
thread: [ 0, 1, 2, 3]
steps:
- uses: prometheus/promci/build@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
with:
parallelism: 4
thread: ${{ matrix.thread }}
publish_default:
name: Publish default branch artifacts
runs-on: ubuntu-latest
permissions:
packages: write
needs: [test_go, build]
if: |
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
||
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
steps:
- uses: prometheus/promci/publish_main@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
with:
docker_hub_organization: prometheuscommunity
docker_hub_password: ${{ secrets.docker_hub_password }}
ghcr_io_organization: prometheus-community
ghcr_io_password: ${{ github.token }}
quay_io_organization: prometheuscommunity
quay_io_password: ${{ secrets.quay_io_password }}
publish_release:
name: Publish release artefacts
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs: [test_go, build]
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: prometheus/promci/publish_release@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
with:
docker_hub_organization: prometheuscommunity
docker_hub_password: ${{ secrets.docker_hub_password }}
ghcr_io_organization: prometheus-community
ghcr_io_password: ${{ github.token }}
quay_io_organization: prometheuscommunity
quay_io_password: ${{ secrets.quay_io_password }}
github_token: ${{ github.token }}