chore(deps): update golang docker tag to v1.26.5 #189
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright AGNTCY Contributors (https://github.com/agntcy) | |
| # SPDX-License-Identifier: Apache-2.0 | |
| --- | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.26.4" | |
| cache-dependency-path: "**/*.sum" | |
| cache: true | |
| - name: Install Task | |
| uses: go-task/setup-task@70f2430ad412f838533de8c0515c749ffb2b8bd3 # v1.1.0 | |
| with: | |
| version: 3.49.1 | |
| - name: Run linters | |
| run: task lint | |
| license: | |
| name: License | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.26.4" | |
| cache-dependency-path: "**/*.sum" | |
| cache: true | |
| - name: Setup license cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: .licensei.cache | |
| key: license-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| license-cache-${{ runner.os }}- | |
| - name: Install Task | |
| uses: go-task/setup-task@70f2430ad412f838533de8c0515c749ffb2b8bd3 # v1.1.0 | |
| with: | |
| version: 3.49.1 | |
| - name: License cache | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: task license:cache | |
| - name: License check | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: task license | |
| verify: | |
| name: Verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.26.4" | |
| cache-dependency-path: "**/*.sum" | |
| cache: true | |
| - name: Install Task | |
| uses: go-task/setup-task@70f2430ad412f838533de8c0515c749ffb2b8bd3 # v1.1.0 | |
| with: | |
| version: 3.49.1 | |
| - name: Check auto-generated code | |
| run: | | |
| task gen | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| echo "There are uncommitted changes after running 'task gen'. Please commit these changes." | |
| exit 1 | |
| fi | |
| build: | |
| name: Build | |
| needs: | |
| - lint | |
| - license | |
| - verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Login to ghcr.io | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| registry: ghcr.io | |
| username: notused | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Docker metadata | |
| id: metadata | |
| uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 | |
| with: | |
| images: | | |
| ghcr.io/agntcy/dir-runtime-discovery,enable=true | |
| ghcr.io/agntcy/dir-runtime-server,enable=true | |
| - name: Build images | |
| uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 | |
| with: | |
| provenance: false | |
| files: | | |
| ./docker-bake.hcl | |
| set: | | |
| *.platform=linux/amd64 | |
| *.cache-to=type=gha,mode=max | |
| *.cache-from=type=gha | |
| env: | |
| IMAGE_REPO: ghcr.io/agntcy | |
| IMAGE_TAG: ${{ github.sha }} | |
| test: | |
| name: Unit Test | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.26.4" | |
| cache-dependency-path: "**/*.sum" | |
| cache: true | |
| - name: Install Task | |
| uses: go-task/setup-task@70f2430ad412f838533de8c0515c749ffb2b8bd3 # v1.1.0 | |
| with: | |
| version: 3.49.1 | |
| - name: Run unit tests with coverage | |
| run: task test:unit:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2 | |
| with: | |
| files: ./discovery/coverage.out,./server/coverage.out,./store/coverage.out,./utils/coverage.out | |
| flags: unit | |
| codecov_yml_path: codecov.yml | |
| use_oidc: true | |
| push: | |
| name: Push Images | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Login to ghcr.io | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| registry: ghcr.io | |
| username: notused | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Docker metadata | |
| id: metadata | |
| uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 | |
| with: | |
| images: | | |
| ghcr.io/agntcy/dir-runtime-discovery | |
| ghcr.io/agntcy/dir-runtime-server | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest | |
| - name: Build and push | |
| uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 | |
| with: | |
| push: true | |
| provenance: false | |
| files: | | |
| ./docker-bake.hcl | |
| cwd://${{ steps.metadata.outputs.bake-file }} | |
| set: | | |
| *.platform=linux/amd64,linux/arm64 | |
| *.output=type=registry | |
| *.cache-to=type=gha,mode=max | |
| *.cache-from=type=gha | |
| env: | |
| IMAGE_REPO: ghcr.io/agntcy | |
| IMAGE_TAG: ${{ github.ref_name }} | |
| helm: | |
| name: Helm Chart | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| registry: ghcr.io | |
| username: notused | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Helm | |
| uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0 | |
| - name: Helm update dependencies | |
| run: helm dependency update install/chart | |
| - name: Helm lint | |
| run: helm lint install/chart --with-subcharts | |
| - name: Helm package | |
| id: build | |
| run: | | |
| helm package install/chart --dependency-update --version ${{ github.ref_name }} | |
| echo "package=runtime-${{ github.ref_name }}.tgz" >> "$GITHUB_OUTPUT" | |
| - name: Helm push to GHCR OCI registry | |
| run: | | |
| helm push ${{ steps.build.outputs.package }} oci://ghcr.io/agntcy/dir-runtime/helm-charts | |
| release: | |
| name: GitHub Release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: | |
| - push | |
| - helm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create Release | |
| uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 | |
| with: | |
| draft: true | |
| generate_release_notes: true | |
| success: | |
| name: Success | |
| if: ${{ !cancelled() && !contains(needs.*.result, 'cancelled') && !contains(needs.*.result, 'failure') }} | |
| needs: | |
| - lint | |
| - license | |
| - verify | |
| - build | |
| - test | |
| - push | |
| - helm | |
| - release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Echo Success | |
| run: echo "::notice::Success! All checks passed." |