diff --git a/.github/env b/.github/env deleted file mode 100644 index bb870e9737..0000000000 --- a/.github/env +++ /dev/null @@ -1,2 +0,0 @@ -golang-version=1.16 -golangci-lint-version=v1.42.1 \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json index ec4e0747ee..78523b858e 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -6,24 +6,44 @@ ], "ignoreDeps": ["github.com/prometheus/prometheus"], "dependencyDashboardLabels": ["dependencies"], + "labels": ["dependencies"], + "regexManagers": [ + { + "fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"], + "matchStrings": ["golangci-lint-version:\\s(?.*?)\\n"], + "datasourceTemplate": "github-tags", + "depNameTemplate": "golangci/golangci-lint" + }, + { + "fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"], + "matchStrings": ["helm-version:\\s(?.*?)\\n"], + "datasourceTemplate": "github-tags", + "depNameTemplate": "helm/helm" + }, + { + "fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"], + "matchStrings": ["golang-version:\\s(?.*?)\\n"], + "datasourceTemplate": "golang-version", + "depNameTemplate": "golang" + } + ], "packageRules": [ { - "labels": ["helm", "dependencies"], + "addLabels": ["helm"], "groupName": "helm charts", "matchManagers": ["helmv3", "helm-values"] }, { - "labels": ["go", "dependencies"], + "addLabels": ["go"], "groupName": "golang", "matchManagers": ["gomod"] }, { - "labels": ["github_actions", "dependencies"], + "addLabels": ["github_actions"], "groupName": "github actions", - "matchManagers": ["github-actions"] + "matchPaths": [".github/**"] }, { - "labels": ["dependencies"], "groupName": "docker-compose", "matchManagers": ["docker-compose"] } diff --git a/.github/workflows/go-releaser.yml b/.github/workflows/go-releaser.yml index 5762e2a847..84ae451de4 100644 --- a/.github/workflows/go-releaser.yml +++ b/.github/workflows/go-releaser.yml @@ -11,6 +11,9 @@ on: pull_request: branches: ['**'] +env: + golang-version: 1.16.0 + jobs: goreleaser: runs-on: ubuntu-latest @@ -20,9 +23,6 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - name: Set up Go diff --git a/.github/workflows/go-scheduled.yml b/.github/workflows/go-scheduled.yml index 8773c5e08c..3080947c74 100644 --- a/.github/workflows/go-scheduled.yml +++ b/.github/workflows/go-scheduled.yml @@ -10,6 +10,9 @@ on: schedule: - cron: "6 0 * * *" +env: + golang-version: 1.16.0 + jobs: build: @@ -19,9 +22,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: @@ -49,10 +49,7 @@ jobs: lfs: true - name: Checkout LFS objects - run: git lfs checkout - - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV + run: git lfs checkout - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 @@ -96,9 +93,6 @@ jobs: - name: Checkout LFS objects run: git lfs checkout - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d3cb901eef..d373e78d42 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,6 +10,10 @@ on: pull_request: branches: ['**'] +env: + golang-version: 1.16.0 + golangci-lint-version: v1.42.1 + jobs: build: name: Build and Lint @@ -18,9 +22,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: @@ -50,9 +51,6 @@ jobs: - name: Checkout test data files run: wget https://github.com/timescale/promscale-test-data/raw/main/traces-dataset.sz -O pkg/tests/testdata/traces-dataset.sz - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: @@ -109,9 +107,6 @@ jobs: - name: Checkout test data files run: wget https://github.com/timescale/promscale-test-data/raw/main/traces-dataset.sz -O pkg/tests/testdata/traces-dataset.sz - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 9de4137dd7..0d8e9bac31 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -7,6 +7,9 @@ on: pull_request: branches: [master, main, force_test, release-*] +env: + helm-version: v3.7.1 + jobs: generate: runs-on: ubuntu-latest @@ -27,7 +30,7 @@ jobs: - name: Set up Helm uses: azure/setup-helm@v2.0 with: - version: v3.7.1 + version: ${{ env.helm-version }} # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and # yamllint (https://github.com/adrienverge/yamllint) which require Python @@ -38,8 +41,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.2.0 - with: - version: v3.4.0 - name: Run chart-testing (list-changed) id: list-changed @@ -71,7 +72,7 @@ jobs: - name: Set up Helm uses: azure/setup-helm@v2.0 with: - version: v3.7.1 + version: ${{ env.helm-version }} - name: Create package env: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 7f7994b43e..f4fd4e1d0d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -10,6 +10,9 @@ on: pull_request: branches: [master, main, force_test, release-*] +env: + golang-version: 1.16.0 + jobs: run: runs-on: ubuntu-latest @@ -25,9 +28,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: diff --git a/.github/workflows/mixin.yml b/.github/workflows/mixin.yml index 8820e3e72c..a5b1ad9b14 100644 --- a/.github/workflows/mixin.yml +++ b/.github/workflows/mixin.yml @@ -6,6 +6,10 @@ on: pull_request: paths: - 'docs/mixin/alerts/*.yml' + +env: + golang-version: 1.16.0 + jobs: check-mixin: runs-on: ubuntu-latest @@ -13,9 +17,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Import environment variables - run: cat ".github/env" >> $GITHUB_ENV - - name: Set up Go ${{ env.golang-version }} uses: actions/setup-go@v2.2.0 with: