Skip to content
Open
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
50 changes: 0 additions & 50 deletions .circleci/config.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
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.25-base
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- run: make SKIP_GOLANGCI_LINT=1
- run: git diff --exit-code
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: prom2json
path: prom2json
if-no-files-found: error

build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
thread: [0, 1, 2]
steps:
- uses: prometheus/promci/build@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
with:
parallelism: 3
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_login: ${{ secrets.DOCKER_HUB_LOGIN }}
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
ghcr_io_password: ${{ github.token }}
quay_io_login: ${{ secrets.QUAY_IO_LOGIN }}
quay_io_password: ${{ secrets.QUAY_IO_PASSWORD }}

publish_release:
name: Publish release artifacts
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_login: ${{ secrets.DOCKER_HUB_LOGIN }}
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
ghcr_io_password: ${{ github.token }}
quay_io_login: ${{ secrets.QUAY_IO_LOGIN }}
quay_io_password: ${{ secrets.QUAY_IO_PASSWORD }}
github_token: ${{ github.token }}
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ linters:
- errcheck
# Taken from the default exclusions in v1.
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked