name: CI on: # yamllint disable-line rule:truthy push: branches: - main tags: - v* pull_request: jobs: test: name: Test runs-on: ubuntu-latest # Whenever the Go version is updated here, .promu.yml # should also be updated. container: image: quay.io/prometheus/golang-builder:1.23-base steps: - uses: actions/checkout@v4 - uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 - uses: ./.github/promci/actions/setup_environment - run: make SKIP_GOLANGCI_LINT=1 build: name: Build runs-on: ubuntu-latest strategy: matrix: thread: [ 0, 1, 2, 3, 4, 5 ] steps: - uses: actions/checkout@v4 - uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 - uses: ./.github/promci/actions/build with: parallelism: 6 thread: ${{ matrix.thread }} publish_master: name: Publish master branch artifacts runs-on: ubuntu-latest needs: [test, build] if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' steps: - uses: actions/checkout@v4 - uses: prometheus/promci@v0.0.2 - uses: ./.github/promci/actions/publish_main with: docker_hub_login: ${{ secrets.docker_hub_login }} docker_hub_password: ${{ secrets.docker_hub_password }} quay_io_login: ${{ secrets.quay_io_login }} quay_io_password: ${{ secrets.quay_io_password }} publish_release: name: Publish release artifacts runs-on: ubuntu-latest needs: [test, build] if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v4 - uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 - uses: ./.github/promci/actions/publish_release with: docker_hub_login: ${{ secrets.docker_hub_login }} docker_hub_password: ${{ secrets.docker_hub_password }} quay_io_login: ${{ secrets.quay_io_login }} quay_io_password: ${{ secrets.quay_io_password }} github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}