Skip to content

Commit ed21b7d

Browse files
authored
Fix workflows (#1308)
1 parent c6bc70e commit ed21b7d

File tree

2 files changed

+35
-42
lines changed

2 files changed

+35
-42
lines changed

.github/workflows/check-grafana-compatibility.yml

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ name: Detect breaking change with Grafana
55
on:
66
pull_request:
77
paths:
8-
- 'go.mod'
9-
- 'go.sum'
8+
- "go.mod"
9+
- "go.sum"
1010
branches:
11-
- 'main'
11+
- "main"
1212

1313
jobs:
1414
buildPR:
@@ -17,41 +17,37 @@ jobs:
1717
permissions:
1818
contents: read
1919
steps:
20-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21-
with:
22-
persist-credentials: false
23-
path: './grafana-plugin-sdk-go'
24-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
with:
26-
persist-credentials: false
27-
repository: 'grafana/grafana'
28-
path: './grafana'
29-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0
30-
with:
31-
cache: false
32-
go-version: '~1.22'
33-
check-latest: true
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
persist-credentials: false
23+
path: "./grafana-plugin-sdk-go"
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
persist-credentials: false
27+
repository: "grafana/grafana"
28+
path: "./grafana"
29+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0
30+
with:
31+
cache: false
32+
go-version: "~1.22"
33+
check-latest: true
3434

35-
- name: Check if branch exists in Grafana
36-
working-directory: './grafana'
37-
env:
38-
BRANCH: ${{ github.head_ref }}
39-
run: |
40-
if git ls-remote --heads --quiet --exit-code origin "$BRANCH"; then
41-
echo "Found branch $BRANCH in Grafana"
42-
git fetch origin "$BRANCH" && git checkout "$BRANCH"
43-
else
44-
echo "Branch $BRANCH not found in Grafana"
45-
fi
35+
- name: Check if branch exists in Grafana
36+
working-directory: "./grafana"
37+
env:
38+
BRANCH: ${{ github.head_ref }}
39+
run: |
40+
if git ls-remote --heads --quiet --exit-code origin "$BRANCH"; then
41+
echo "Found branch $BRANCH in Grafana"
42+
git fetch origin "$BRANCH" && git checkout "$BRANCH"
43+
else
44+
echo "Branch $BRANCH not found in Grafana"
45+
fi
4646
47-
- name: Link sdk
48-
working-directory: './grafana'
49-
run: go mod edit -replace github.com/grafana/grafana-plugin-sdk-go=../grafana-plugin-sdk-go
47+
- name: Link sdk
48+
working-directory: "./grafana"
49+
run: go mod edit -replace github.com/grafana/grafana-plugin-sdk-go=../grafana-plugin-sdk-go
5050

51-
- name: Automatic updates
52-
working-directory: './grafana'
53-
run: go mod tidy
54-
55-
- name: Build Grafana
56-
working-directory: './grafana'
57-
run: make build-go
51+
- name: Build Grafana
52+
working-directory: "./grafana"
53+
run: make build-go

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
permissions:
1010
contents: read
1111

12-
env:
13-
GOLANGCI_LINT_VERSION: v1.64.2
14-
1512
jobs:
1613
lint-build-test:
1714
name: Lint, Build, and Test
@@ -30,7 +27,7 @@ jobs:
3027
- name: Run golangci-lint
3128
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
3229
with:
33-
version: ${GOLANGCI_LINT_VERSION}
30+
version: v1.64.2
3431
args: |
3532
"./..." --timeout=7m
3633
skip-cache: true

0 commit comments

Comments
 (0)