diff --git a/.github/workflows/check-grafana-compatibility.yml b/.github/workflows/check-grafana-compatibility.yml index e06f830b1..98f5857ab 100644 --- a/.github/workflows/check-grafana-compatibility.yml +++ b/.github/workflows/check-grafana-compatibility.yml @@ -5,10 +5,10 @@ name: Detect breaking change with Grafana on: pull_request: paths: - - 'go.mod' - - 'go.sum' + - "go.mod" + - "go.sum" branches: - - 'main' + - "main" jobs: buildPR: @@ -17,41 +17,37 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - path: './grafana-plugin-sdk-go' - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - repository: 'grafana/grafana' - path: './grafana' - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0 - with: - cache: false - go-version: '~1.22' - check-latest: true + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + path: "./grafana-plugin-sdk-go" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + repository: "grafana/grafana" + path: "./grafana" + - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0 + with: + cache: false + go-version: "~1.22" + check-latest: true - - name: Check if branch exists in Grafana - working-directory: './grafana' - env: - BRANCH: ${{ github.head_ref }} - run: | - if git ls-remote --heads --quiet --exit-code origin "$BRANCH"; then - echo "Found branch $BRANCH in Grafana" - git fetch origin "$BRANCH" && git checkout "$BRANCH" - else - echo "Branch $BRANCH not found in Grafana" - fi + - name: Check if branch exists in Grafana + working-directory: "./grafana" + env: + BRANCH: ${{ github.head_ref }} + run: | + if git ls-remote --heads --quiet --exit-code origin "$BRANCH"; then + echo "Found branch $BRANCH in Grafana" + git fetch origin "$BRANCH" && git checkout "$BRANCH" + else + echo "Branch $BRANCH not found in Grafana" + fi - - name: Link sdk - working-directory: './grafana' - run: go mod edit -replace github.com/grafana/grafana-plugin-sdk-go=../grafana-plugin-sdk-go + - name: Link sdk + working-directory: "./grafana" + run: go mod edit -replace github.com/grafana/grafana-plugin-sdk-go=../grafana-plugin-sdk-go - - name: Automatic updates - working-directory: './grafana' - run: go mod tidy - - - name: Build Grafana - working-directory: './grafana' - run: make build-go + - name: Build Grafana + working-directory: "./grafana" + run: make build-go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b2ce2d0d..d3ea6bc81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,6 @@ on: permissions: contents: read -env: - GOLANGCI_LINT_VERSION: v1.64.2 - jobs: lint-build-test: name: Lint, Build, and Test @@ -30,7 +27,7 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: - version: ${GOLANGCI_LINT_VERSION} + version: v1.64.2 args: | "./..." --timeout=7m skip-cache: true