Skip to content

Commit

Permalink
Merge 90ade71 into f43cc83
Browse files Browse the repository at this point in the history
  • Loading branch information
imiric committed May 22, 2023
2 parents f43cc83 + 90ade71 commit 973ad8f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/actions/lint/action.yml
Expand Up @@ -13,10 +13,16 @@ runs:
shell: bash
env: #TODO: remove after https://github.com/actions/runner/issues/2473 is fixed
GITHUB_ACTION_REF: ${{ github.action_ref || github.head_ref }}
# If the PR was created from the grafana/k6 repo, use the .golangci.yml
# from that branch, otherwise use the one on grafana/k6 master.
run: |
RulesURL="https://raw.githubusercontent.com/grafana/k6/${{ env.GITHUB_ACTION_REF }}/.golangci.yml"
echo "Downloading ${RulesURL}..."
curl --silent --show-error --fail --no-location "${RulesURL}" --output "${{ github.action_path }}/.golangci.yml"
echo "$GITHUB_ACTION_PATH"
find "$GITHUB_ACTION_PATH"
branch="${{ env.GITHUB_ACTION_REF }}"
[ "$GITHUB_REPOSITORY" = "grafana/k6" ] || branch="master"
rules_url="https://raw.githubusercontent.com/grafana/k6/${branch}/.golangci.yml"
echo "Downloading '${rules_url}' ..."
curl --silent --show-error --fail --no-location "${rules_url}" --output "${{ github.action_path }}/.golangci.yml"
echo "GolangCIVersion=$(head -n 1 "${{ github.action_path }}/.golangci.yml" | tr -d '# ')" >> "${GITHUB_OUTPUT}"
id: getenv
Expand Down

0 comments on commit 973ad8f

Please sign in to comment.