diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e4f3e3f06..2fe7be9e0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,10 +4,12 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/" + directory: "./.github/workflows" + target-branch: "main" schedule: interval: "weekly" day: "monday" + time: "06:00" timezone: "Europe/Paris" groups: gh-dependency: @@ -16,16 +18,24 @@ updates: - package-ecosystem: "gomod" directory: "/" + target-branch: "main" schedule: interval: "weekly" day: "monday" + time: "06:15" timezone: "Europe/Paris" + groups: + go-dependency: + patterns: + - "*" - package-ecosystem: "docker" directory: "/docker" + target-branch: "main" schedule: interval: "weekly" day: "monday" + time: "06:30" timezone: "Europe/Paris" groups: docker-dependency: diff --git a/.github/workflows/api-tests.yaml b/.github/workflows/api-tests.yaml index 262af6b35..a0972cbb0 100644 --- a/.github/workflows/api-tests.yaml +++ b/.github/workflows/api-tests.yaml @@ -78,14 +78,10 @@ jobs: with: fetch-depth: 0 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Install Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Check for changes in specific paths diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c42af0640..b5ea155cc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,7 @@ on: branches: - main paths-ignore: - - '**.md' + - '**/*.md' - 'docs/**' - '.github/workflows/**' - 'LICENSE' @@ -37,27 +37,22 @@ jobs: fetch-depth: 0 fetch-tags: true - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Set up Docker Build uses: docker/setup-buildx-action@v4 - - name: Login to DockerHub + - name: Login to GHCR uses: docker/login-action@v4 with: registry: ghcr.io - username: ${{ secrets.actor }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker images run: | make latest -j $(nproc) - diff --git a/.github/workflows/check-generated-files.yaml b/.github/workflows/check-generated-files.yaml index 9a1d11b94..14b7d18be 100644 --- a/.github/workflows/check-generated-files.yaml +++ b/.github/workflows/check-generated-files.yaml @@ -19,14 +19,10 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Install Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Set GOBIN diff --git a/.github/workflows/lint-and-build.yaml b/.github/workflows/lint-and-build.yaml index 28cafddb6..c6d1272ce 100644 --- a/.github/workflows/lint-and-build.yaml +++ b/.github/workflows/lint-and-build.yaml @@ -14,14 +14,10 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Run linters @@ -38,14 +34,10 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Build all binaries @@ -68,14 +60,10 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Compile check for ${{ matrix.variant.name }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 248786f63..d73f29db6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,7 +8,7 @@ on: branches: - main paths-ignore: - - '**.md' + - '**/*.md' - 'docs/**' - 'LICENSE' - 'MAINTAINERS' @@ -29,14 +29,10 @@ jobs: - name: Checkout Code uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Install protolint @@ -56,7 +52,6 @@ jobs: runs-on: ubuntu-latest outputs: modules: ${{ steps.set-matrix.outputs.modules }} - workflow_changed: ${{ steps.changes.outputs.workflow }} steps: - name: Checkout uses: actions/checkout@v6 @@ -288,14 +283,10 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Get Go version from go.mod - id: go-version - run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT - - name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ steps.go-version.outputs.version }} + go-version-file: go.mod cache-dependency-path: "go.sum" - name: Verify dependencies