Skip to content

Commit 3481845

Browse files
authored
Merge pull request #24 from parca-dev/common-buildid
Use same build ID retrieval mechanism as the agent
2 parents 2aed700 + ab30c8c commit 3481845

File tree

11 files changed

+451
-687
lines changed

11 files changed

+451
-687
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ on:
66
pull_request:
77
branches: [ main ]
88

9-
env:
10-
# renovate: datasource=go depName=mvdan.cc/gofumpt
11-
GOFUMPT_VERSION: v0.3.1
12-
# renovate: datasource=go depName=github.com/golangci/golangci-lint
13-
GOLANGCI_LINT_VERSION: v1.53.3
14-
159
jobs:
1610
skip-check:
1711
name: Skip check
@@ -24,7 +18,7 @@ jobs:
2418
contents: read
2519
steps:
2620
- id: skip-check
27-
uses: fkirc/skip-duplicate-actions@9d116fa7e55f295019cfab7e3ab72b478bcf7fdd # tag=v4.0.0
21+
uses: fkirc/skip-duplicate-actions@v5
2822
with:
2923
do_not_skip: '["schedule", "workflow_dispatch"]'
3024
paths: |-
@@ -44,10 +38,10 @@ jobs:
4438
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
4539
steps:
4640
- name: Check out the code
47-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
41+
uses: actions/checkout@v4
4842

4943
- name: Set up Go
50-
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # tag=v3.2.1
44+
uses: actions/setup-go@v5
5145
with:
5246
go-version-file: 'go.mod'
5347
check-latest: true
@@ -69,6 +63,4 @@ jobs:
6963
run: make vet
7064

7165
- name: Lint
72-
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # tag=v3.3.1
73-
with:
74-
version: ${{ env.GOLANGCI_LINT_VERSION }}
66+
uses: golangci/golangci-lint-action@v6

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ jobs:
3939

4040
steps:
4141
- name: Check out the code
42-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
42+
uses: actions/checkout@v4
4343

4444
- name: Set up Go
45-
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # tag=v3.2.1
45+
uses: actions/setup-go@v5
4646
with:
4747
go-version-file: 'go.mod'
4848
cache: true
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2.1.17
52+
uses: github/codeql-action/init@v3
5353
with:
5454
languages: ${{ matrix.language }}
5555
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,4 +68,4 @@ jobs:
6868
- run: make build
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2.1.17
71+
uses: github/codeql-action/analyze@v3

.github/workflows/container.yml

Lines changed: 0 additions & 135 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
contents: read
2020
steps:
2121
- id: skip-check
22-
uses: fkirc/skip-duplicate-actions@9d116fa7e55f295019cfab7e3ab72b478bcf7fdd # tag=v4.0.0
22+
uses: fkirc/skip-duplicate-actions@v5
2323
with:
2424
do_not_skip: '["schedule", "workflow_dispatch"]'
2525
paths: |-
@@ -38,10 +38,10 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- name: Check out the code
41-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
41+
uses: actions/checkout@v4
4242

4343
- name: Set up Go
44-
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # tag=v3.2.1
44+
uses: actions/setup-go@v5
4545
with:
4646
go-version-file: 'go.mod'
4747
cache: true

.github/workflows/release.yml

Lines changed: 7 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,114 +8,45 @@ on:
88
permissions:
99
contents: write
1010

11-
env:
12-
# renovate: datasource=go depName=github.com/goreleaser/goreleaser
13-
GORELEASER_VERSION: v1.18.2
14-
1511
jobs:
1612
binaries:
1713
name: Goreleaser release
1814
runs-on: ubuntu-latest
1915
if: startsWith(github.ref, 'refs/tags/')
2016
steps:
2117
- name: Checkout
22-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
18+
uses: actions/checkout@v4
2319
with:
2420
fetch-depth: 0
2521

2622
- name: Set up Go
27-
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
23+
uses: actions/setup-go@v5
2824
with:
2925
go-version-file: 'go.mod'
3026

3127
- name: Run GoReleaser
32-
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
28+
uses: goreleaser/goreleaser-action@v6
3329
with:
3430
distribution: goreleaser
35-
version: ${{ env.GORELEASER_VERSION }}
36-
args: release --clean --timeout=60m
31+
args: release --clean
3732
env:
3833
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3934

4035
- name: Archive generated artifacts
41-
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
36+
uses: actions/upload-artifact@v4
4237
with:
4338
name: parca-debuginfo-dist-release
4439
if-no-files-found: error
4540
path: |
46-
goreleaser/dist
47-
!goreleaser/dist/*.txt
41+
dist/
4842
4943
docs:
5044
name: Publish Docs
5145
runs-on: ubuntu-latest
5246
needs: binaries
5347
steps:
54-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
48+
- uses: actions/checkout@v4
5549

5650
- name: Publish Vercel
5751
run: |
5852
curl -X POST "https://api.vercel.com/v1/integrations/deploy/${{ secrets.VERCEL_WEBHOOK }}"
59-
60-
container:
61-
name: Build and release container images
62-
runs-on: ubuntu-latest
63-
needs: binaries
64-
container:
65-
# https://github.com/containers/podman/tree/main/contrib/podmanimage
66-
# Specifying SHA repeatedly fails:
67-
# @sha256:421ac576cebff98e90c531e7b9ce4482370ecc7cee59abc2341714031bfb5f43
68-
image: quay.io/containers/podman:v4.1.1
69-
options: >-
70-
--device /dev/fuse:rw
71-
--privileged
72-
--security-opt label=disable
73-
--security-opt seccomp=unconfined
74-
permissions:
75-
id-token: write
76-
packages: write
77-
contents: read
78-
steps:
79-
- name: Install dependencies
80-
run: dnf install --assumeyes --repo fedora git make jq
81-
82-
- name: Check out code into the Go module directory
83-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
84-
85-
- name: Get branch name
86-
shell: bash
87-
run: echo "GITHUB_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
88-
89-
- uses: actions/download-artifact@v3
90-
with:
91-
name: parca-debuginfo-dist-release
92-
path: goreleaser/dist
93-
94-
- name: Build container
95-
run: make container
96-
97-
- name: Check images are created
98-
run: podman images | grep 'ghcr.io/parca-dev/parca-debuginfo'
99-
100-
- name: Login to registry
101-
if: ${{ github.event_name != 'pull_request' }}
102-
run: |
103-
echo "${{ secrets.GITHUB_TOKEN }}" | podman login -u parca-dev --password-stdin ghcr.io
104-
105-
- name: Install cosign
106-
uses: sigstore/cosign-installer@09a077b27eb1310dcfb21981bee195b30ce09de0 # tag=v2.5.0
107-
108-
- name: Install crane
109-
if: ${{ github.event_name != 'pull_request' }}
110-
uses: imjasonh/setup-crane@e82f1b9a8007d399333baba4d75915558e9fb6a4 # tag=v0.2
111-
112-
- name: Push container
113-
if: ${{ github.event_name != 'pull_request' }}
114-
run: |
115-
make push-container
116-
117-
- name: Sign container
118-
env:
119-
COSIGN_EXPERIMENTAL: true
120-
run: |
121-
make sign-container

.golangci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,21 @@ linters:
1313
- style
1414
- unused
1515
disable:
16-
- exhaustivestruct
1716
- exhaustruct
1817
- funlen
1918
- gci
2019
- gochecknoglobals
2120
- godox
22-
- goerr113
23-
- golint
24-
- gomnd
2521
- gomoddirectives
26-
- interfacer
2722
- ireturn
2823
- lll
29-
- maligned
3024
- nlreturn
3125
- paralleltest
32-
- scopelint
3326
- testpackage
3427
- varnamelen
3528
- wrapcheck
3629
- wsl
37-
- nosnakecase
30+
- err113
3831

3932
issues:
4033
exclude-rules:
@@ -56,7 +49,7 @@ linters-settings:
5649
- pkg: github.com/pkg/errors
5750
desc: Use fmt.Errorf instead
5851
errcheck:
59-
exclude: ./.errcheck_excludes.txt
52+
exclude-functions: ./.errcheck_excludes.txt
6053
goimports:
6154
local-prefixes: github.com/parca-dev/parca-debuginfo
6255
gofumpt:

0 commit comments

Comments
 (0)