Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# actionlint configuration
# https://github.com/rhysd/actionlint/blob/main/docs/config.md
1 change: 0 additions & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
branches:
- name: main
protection:
Expand Down
10 changes: 2 additions & 8 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,15 @@ pull:
daysUntilClose: 14
daysUntilStale: 60
markComment: >
Hello 👋 Looks like there was no activity on this amazing PR for the last 60 days.
**Do you mind updating us on the status?** Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗

If there will be no activity in the next 2 weeks, this issue will be closed (we can always reopen a PR if you get back to this!).
Hello 👋 Looks like there was no activity on this amazing PR for the last 60 days. **Do you mind updating us on the status?** Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗 #magic___^_^___line If there will be no activity in the next 2 weeks, this issue will be closed (we can always reopen a PR if you get back to this!).
# unmarkComment: No need for unmark comment.
closeComment: >
Closing for now as promised, let us know if you need this to be reopened! 🤗
issues:
daysUntilClose: 90
daysUntilStale: 180
markComment: >
Hello 👋 Looks like there was no activity on this issue for the last 3 months.
**Do you mind updating us on the status?** Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗

If there will be no activity in the next 4 weeks, this issue will be closed (we can always reopen an issue if we need!).
Hello 👋 Looks like there was no activity on this issue for the last 3 months. **Do you mind updating us on the status?** Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 #magic___^_^___line If there will be no activity in the next 4 weeks, this issue will be closed (we can always reopen an issue if we need!).
# unmarkComment: No need for unmark comment.
closeComment: >
Closing for now as promised, let us know if you need this to be reopened! 🤗
56 changes: 28 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '31 21 * * 6'

Expand All @@ -40,39 +40,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ['go']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
9 changes: 4 additions & 5 deletions .github/workflows/container_description.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
name: Push README to Docker Hub
on:
push:
paths:
- "README.md"
- "README-containers.md"
- ".github/workflows/container_description.yml"
branches: [ main, master ]
branches: [main, master]

permissions:
contents: read
Expand All @@ -22,7 +21,7 @@ jobs:
with:
persist-credentials: false
- name: Set docker hub repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> "$GITHUB_ENV"
- name: Push README to Dockerhub
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
Expand All @@ -46,9 +45,9 @@ jobs:
with:
persist-credentials: false
- name: Set quay.io org name
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
run: echo "DOCKER_REPO=$(echo "quay.io/${GITHUB_REPOSITORY_OWNER}" | tr -d '-')" >> "$GITHUB_ENV"
- name: Set quay.io repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> "$GITHUB_ENV"
- name: Push README to quay.io
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# This action is synced from https://github.com/prometheus/prometheus
name: golangci-lint
on:
Expand All @@ -12,14 +11,14 @@ on:
- ".golangci.yml"
pull_request:

permissions: # added using https://github.com/step-security/secure-repo
permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
schedule:
- cron: '22 1 * * 0'
push:
branches: [ "main" ]
branches: ["main"]

# Declare default permissions as read only.
permissions: read-all
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/update-go-versions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Generate Metric files for new Go version

on:
Expand Down
153 changes: 87 additions & 66 deletions .github/workflows/go.yml → .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,89 @@
---
name: Go
on:
pull_request:
push:
branches:
- main
- "release-*"

# Modified to avoid canceling all matrix jobs when one fails
# Each job type will have its own concurrency group
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true

# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read

jobs:
supportedVersions:
name: Fetch supported Go versions
runs-on: ubuntu-latest
outputs:
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
steps:
- name: Checkout code
name: Validate
on:
pull_request:
push:
branches:
- main
- "release-*"

# Modified to avoid canceling all matrix jobs when one fails
# Each job type will have its own concurrency group
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true

# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read

jobs:
supported_versions:
name: Fetch supported Go versions
runs-on: ubuntu-latest
outputs:
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Read supported_go_versions.txt
id: matrix
run: |
versions=$(cat supported_go_versions.txt)
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]"
echo "supported_versions=$matrix" >> $GITHUB_OUTPUT
test:
name: Tests (${{ matrix.go_version }})
runs-on: ubuntu-latest
needs: supportedVersions
# Set fail-fast to false to ensure all Go versions are tested regardless of failures
strategy:
fail-fast: false
matrix:
go_version: ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }}
# Define concurrency at the job level for matrix jobs
concurrency:
group: ${{ github.workflow }}-test-${{ matrix.go_version }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout code
- name: Read supported_go_versions.txt
id: matrix
run: |
versions="$(cat supported_go_versions.txt)"
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]"
echo "supported_versions=$matrix" >> "$GITHUB_OUTPUT"

test:
name: Tests (${{ matrix.go_version }})
runs-on: ubuntu-latest
needs: supported_versions
# Set fail-fast to false to ensure all Go versions are tested regardless of failures
strategy:
fail-fast: false
matrix:
go_version: ${{ fromJSON(needs.supported_versions.outputs.supported_versions) }}
# Define concurrency at the job level for matrix jobs
concurrency:
group: ${{ github.workflow }}-test-${{ matrix.go_version }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true

steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v6.0.0
with:
go-version: ${{ matrix.go_version }}
check-latest: true
cache-dependency-path: go.sum

- name: Run tests and check license
run: make check_license test
env:
CI: true

- name: Run style and unused
if: ${{ matrix.go_version == '1.22' }}
run: make style unused

- name: Check for CRLF line endings
run: make check-crlf

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v6.0.0
with:
go-version: ${{ matrix.go_version }}
check-latest: true
cache-dependency-path: go.sum

- name: Run tests and check license
run: make check_license test
env:
CI: true

- name: Run style and unused
if: ${{ matrix.go_version == '1.22' }}
run: make style unused

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Go
uses: actions/setup-go@v6.0.0
with:
go-version: stable
check-latest: true

- name: Lint YAML files
run: make lint-yaml

- name: Lint GitHub Actions workflows
run: make lint-actions
17 changes: 17 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yamlfmt configuration
# https://github.com/google/yamlfmt

doublestar: true

exclude:
- "**/testdata/**"
- "**/*testdata*/**"

gitignore_excludes: true

formatter:
type: basic
indent: 2
include_document_start: false
retain_line_breaks: true
max_line_length: 0
Loading
Loading