Skip to content

Commit f24375b

Browse files
authored
Merge pull request #276 from prometheus-community/superq/promci_bump
Update PromCI
2 parents 9f81415 + c4c9f7d commit f24375b

3 files changed

Lines changed: 26 additions & 60 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: CI
33
on:
44
pull_request:
55
push:
6-
branches: [master, 'release-*']
6+
branches: [main, master, 'release-*']
77
tags: ['v*']
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test_go:
1114
name: Go tests
@@ -18,61 +21,28 @@ jobs:
1821
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1922
with:
2023
persist-credentials: false
21-
- uses: prometheus/promci@fc721ff8497a70a93a881cd552b71af7fb3a9d53 # v0.5.4
22-
- uses: ./.github/promci/actions/setup_environment
23-
- run: make
24+
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
25+
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
26+
- run: git diff --exit-code
2427

2528
build:
26-
name: Build Prometheus for common architectures
27-
runs-on: ubuntu-latest
28-
if: |
29-
!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
30-
&&
31-
!(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
32-
&&
33-
!(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
34-
&&
35-
!(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
36-
strategy:
37-
matrix:
38-
thread: [ 0, 1, 2 ]
39-
steps:
40-
- uses: prometheus/promci/build@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
41-
with:
42-
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
43-
parallelism: 3
44-
thread: ${{ matrix.thread }}
45-
46-
build_all:
47-
name: Build Prometheus for all architectures
29+
name: Build
4830
runs-on: ubuntu-latest
49-
if: |
50-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
51-
||
52-
(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
53-
||
54-
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
55-
||
56-
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
5731
strategy:
5832
matrix:
59-
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
60-
61-
# Whenever the Go version is updated here, .promu.yml
62-
# should also be updated.
33+
thread: [ 0, 1, 2, 3]
6334
steps:
6435
- uses: prometheus/promci/build@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
6536
with:
66-
parallelism: 12
37+
parallelism: 4
6738
thread: ${{ matrix.thread }}
6839

69-
publish_main:
70-
# https://github.com/prometheus/promci/blob/52c7012f5f0070d7281b8db4a119e21341d43c91/actions/publish_main/action.yml
71-
name: Publish main branch artifacts
40+
publish_default:
41+
name: Publish default branch artifacts
7242
runs-on: ubuntu-latest
7343
permissions:
7444
packages: write
75-
needs: [test_go, build_all]
45+
needs: [test_go, build]
7646
if: |
7747
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
7848
||
@@ -81,11 +51,9 @@ jobs:
8151
- uses: prometheus/promci/publish_main@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
8252
with:
8353
docker_hub_organization: prometheuscommunity
84-
docker_hub_login: ${{ secrets.docker_hub_login }}
8554
docker_hub_password: ${{ secrets.docker_hub_password }}
8655
ghcr_io_password: ${{ github.token }}
8756
quay_io_organization: prometheuscommunity
88-
quay_io_login: ${{ secrets.quay_io_login }}
8957
quay_io_password: ${{ secrets.quay_io_password }}
9058

9159
publish_release:
@@ -94,17 +62,15 @@ jobs:
9462
permissions:
9563
contents: write
9664
packages: write
97-
needs: [test_go, build_all]
65+
needs: [test_go, build]
9866
if: |
9967
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
10068
steps:
10169
- uses: prometheus/promci/publish_release@d9d4f5688814f0b77bf003d07fb8c00507390634 # v0.8.2
10270
with:
10371
docker_hub_organization: prometheuscommunity
104-
docker_hub_login: ${{ secrets.docker_hub_login }}
10572
docker_hub_password: ${{ secrets.docker_hub_password }}
10673
ghcr_io_password: ${{ github.token }}
10774
quay_io_organization: prometheuscommunity
108-
quay_io_login: ${{ secrets.quay_io_login }}
10975
quay_io_password: ${{ secrets.quay_io_password }}
11076
github_token: ${{ github.token }}

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ require (
3131
github.com/smarty/assertions v1.15.0 // indirect
3232
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
3333
go.yaml.in/yaml/v2 v2.4.4 // indirect
34-
golang.org/x/crypto v0.49.0 // indirect
35-
golang.org/x/net v0.51.0 // indirect
34+
golang.org/x/crypto v0.51.0 // indirect
35+
golang.org/x/net v0.55.0 // indirect
3636
golang.org/x/oauth2 v0.35.0 // indirect
3737
golang.org/x/sync v0.20.0 // indirect
38-
golang.org/x/sys v0.42.0 // indirect
39-
golang.org/x/text v0.35.0 // indirect
38+
golang.org/x/sys v0.45.0 // indirect
39+
golang.org/x/text v0.37.0 // indirect
4040
golang.org/x/time v0.15.0 // indirect
4141
google.golang.org/protobuf v1.36.11 // indirect
4242
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
7272
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
7373
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
7474
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
75-
golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4=
76-
golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=
77-
golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=
78-
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
75+
golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI=
76+
golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8=
77+
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
78+
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
7979
golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ=
8080
golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
8181
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
8282
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
83-
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
84-
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
85-
golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8=
86-
golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=
83+
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
84+
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
85+
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
86+
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
8787
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
8888
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
8989
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=

0 commit comments

Comments
 (0)