docs(dir): add dirctl daemon to README deployment section #4738
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*.*.*" | |
| - "!gui/**" | |
| pull_request: | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| code: ${{ steps.result.outputs.code }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Check for code changes | |
| uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: filter | |
| with: | |
| filters: | | |
| code: | |
| - '!gui/**' | |
| - '!docs/**' | |
| - '!README.md' | |
| - '!CHANGELOG.md' | |
| - '!CONTRIBUTING.md' | |
| - '!CODE_OF_CONDUCT.md' | |
| - '!SECURITY.md' | |
| - '!LICENSE.md' | |
| - '!MAINTAINERS.md' | |
| - '!CONTRIBUTORS.md' | |
| - '!AUTHZ.md' | |
| - '!API_SPEC.md' | |
| - '!RELEASE.md' | |
| - '!.gitignore' | |
| - name: Determine result | |
| id: result | |
| run: | | |
| # Always run for tag pushes (releases), otherwise use paths-filter result | |
| if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then | |
| echo "code=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "code=${{ steps.filter.outputs.code }}" >> $GITHUB_OUTPUT | |
| fi | |
| lint: | |
| name: Lint | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.26.1" | |
| cache-dependency-path: "**/*.sum" | |
| - name: Install Task | |
| uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 #v2.0.0 | |
| - name: Setup lint cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: | | |
| ~/.cache/golangci-lint | |
| ~/.cache/go-build | |
| key: lint-cache-${{ runner.os }}-${{ hashFiles('**/*.sum') }} | |
| restore-keys: | | |
| lint-cache-${{ runner.os }}- | |
| - name: Run linters | |
| run: | | |
| task lint | |
| license: | |
| name: License | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Task | |
| uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 #v2.0.0 | |
| - name: Setup license cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: | | |
| **/.licensei.cache | |
| key: license-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| license-cache-${{ runner.os }}- | |
| - name: License cache | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| task license:cache | |
| - name: License | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| task license | |
| verify: | |
| name: Verify | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Task | |
| uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 #v2.0.0 | |
| - 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 | |
| # This build builds local artifacts to the workflow run so that | |
| # we can load and test functionalities locally. | |
| # It does not push a tag as it includes test-specific instrumentation | |
| # and is not intended for use outside of testing. | |
| build: | |
| name: Build | |
| needs: | |
| - lint | |
| - license | |
| - verify | |
| uses: ./.github/workflows/reusable-build.yaml | |
| with: | |
| image_repo: ghcr.io/agntcy | |
| image_tag: ${{ github.sha }} | |
| build_coverage_images: true | |
| # This build pushes a "latest" tag to the repo so that we can later do | |
| # security posture analysis and post-check tests in other workflows. | |
| # It does not include any test-specific instrumentation. | |
| # Only run for push to main, nothing else (tags/releases/PRs) | |
| push: | |
| name: Push | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| needs: | |
| - lint | |
| - license | |
| - verify | |
| uses: ./.github/workflows/reusable-build.yaml | |
| with: | |
| image_repo: ghcr.io/agntcy | |
| image_tag: latest | |
| push: true | |
| test: | |
| name: Test | |
| needs: | |
| - build | |
| uses: ./.github/workflows/reusable-test.yaml | |
| with: | |
| image_repo: ghcr.io/agntcy | |
| image_tag: ${{ github.sha }} | |
| upload-codecov: | |
| name: Upload all coverage artifacts to Codecov | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - artifact_name: coverage-unit | |
| codecov_flag: unit | |
| - artifact_name: coverage-e2e-Local | |
| codecov_flag: e2e-Local | |
| - artifact_name: coverage-e2e-Network | |
| codecov_flag: e2e-Network | |
| # NOTE: Currently MCP and Federation coverage is excluded within Upload E2E coverage artifact job | |
| # - artifact_name: coverage-e2e-MCP | |
| # codecov_flag: e2e-MCP | |
| # - artifact_name: coverage-e2e-Federation | |
| # codecov_flag: e2e-Federation | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: .coverage | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | |
| with: | |
| codecov_yml_path: codecov.yml | |
| files: "**/*.out" | |
| flags: ${{ matrix.codecov_flag }} | |
| verbose: true | |
| use_oidc: true | |
| release: | |
| name: Release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: | |
| - test | |
| uses: ./.github/workflows/reusable-release.yaml | |
| with: | |
| image_repo: ghcr.io/agntcy | |
| release_tag: ${{ github.ref_name }} | |
| integration: | |
| name: Run integration tests | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run tests | |
| uses: ./.github/actions/trigger-integrations | |
| with: | |
| github-token: ${{ secrets.AGNTCY_BUILD_BOT_GH_TOKEN }} | |
| success: | |
| name: Success | |
| # https://github.com/actions/runner/issues/2566 | |
| # https://github.com/actions/toolkit/issues/581 | |
| # Success if all needed jobs either passed or were skipped (no failures/cancellations) | |
| if: ${{ !cancelled() && !contains(needs.*.result, 'cancelled') && !contains(needs.*.result, 'failure') }} | |
| needs: | |
| - changes | |
| - test | |
| - upload-codecov | |
| - release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Echo Success | |
| run: | | |
| if [[ "${{ needs.changes.outputs.code }}" == "true" ]]; then | |
| echo "::notice Success! All code checks passed." | |
| else | |
| echo "::notice Success! No code changes detected, skipped builds and tests." | |
| fi |