|
1 | 1 | name: Deploy Agents |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - paths: |
8 | | - - '1-uagents/finance/**' |
9 | | - - '1-uagents/geo/**' |
10 | | - - '1-uagents/knowledge-base/**' |
11 | | - - '1-uagents/search/**' |
12 | | - - '1-uagents/travel/**' |
13 | | - - '1-uagents/utility/**' |
14 | | - - '1-uagents/communication/**' |
15 | | - - 'scripts/deploy-all-agents.sh' |
16 | | - - '.github/workflows/deploy-agents.yaml' |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + paths: |
| 8 | + - "1-uagents/finance/**" |
| 9 | + - "1-uagents/geo/**" |
| 10 | + - "1-uagents/knowledge-base/**" |
| 11 | + - "1-uagents/search/**" |
| 12 | + - "1-uagents/travel/**" |
| 13 | + - "1-uagents/utility/**" |
| 14 | + - "1-uagents/communication/**" |
| 15 | + - "scripts/deploy-all-agents.sh" |
| 16 | + - ".github/workflows/deploy-agents.yaml" |
17 | 17 |
|
18 | 18 | jobs: |
19 | | - deploy: |
20 | | - runs-on: ubuntu-latest |
| 19 | + deploy: |
| 20 | + runs-on: ubuntu-latest |
21 | 21 |
|
22 | | - steps: |
23 | | - - name: Checkout code |
24 | | - uses: actions/checkout@v4 |
25 | | - |
26 | | - - name: Download latest AVCTL release binary |
27 | | - run: | |
28 | | - LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/fetchai/avctl/releases/latest \ |
29 | | - | grep browser_download_url \ |
30 | | - | grep avctl_Linux_x86_64.tar.gz \ |
31 | | - | cut -d '"' -f 4) |
32 | | - |
33 | | - curl -L -o avctl_Linux_x86_64.tar.gz $LATEST_RELEASE_URL |
34 | | - |
35 | | - - name: Extract binary and install |
36 | | - run: | |
37 | | - tar -xvf avctl_Linux_x86_64.tar.gz |
38 | | - chmod +x avctl |
39 | | - mv avctl /usr/local/bin/avctl |
| 22 | + steps: |
| 23 | + - name: Checkout code |
| 24 | + uses: actions/checkout@v4 |
40 | 25 |
|
41 | | - - name: Authenticate with Agentverse |
42 | | - run: avctl auth token ${{ secrets.AGENTVERSE_API_KEY }} |
| 26 | + - name: Download latest AVCTL release binary |
| 27 | + run: | |
| 28 | + LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/fetchai/avctl/releases/latest \ |
| 29 | + | grep browser_download_url \ |
| 30 | + | grep avctl_Linux_x86_64.tar.gz \ |
| 31 | + | cut -d '"' -f 4) |
43 | 32 |
|
44 | | - - name: Deploy all agents |
45 | | - run: ./scripts/deploy-all-agents.sh |
46 | | - env: |
47 | | - ALPHAVANTAGE_API_KEY: ${{ secrets.ALPHAVANTAGE_API_KEY }} |
48 | | - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
49 | | - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} |
50 | | - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} |
51 | | - OCM_API_KEY: ${{ secrets.OCM_API_KEY }} |
52 | | - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
53 | | - OPENCAGE_API_KEY: ${{ secrets.OPENCAGE_API_KEY }} |
54 | | - WEATHERAPI_KEY: ${{ secrets.WEATHERAPI_KEY }} |
55 | | - HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }} |
56 | | - GEOAPIFY_API_KEY: ${{ secrets.GEOAPIFY_API_KEY }} |
57 | | - TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} |
58 | | - RAPIDAPI_API_KEY: ${{ secrets.RAPIDAPI_API_KEY }} |
59 | | - SAPLING_API_KEY: ${{ secrets.SAPLING_API_KEY }} |
| 33 | + curl -L -o avctl_Linux_x86_64.tar.gz $LATEST_RELEASE_URL |
60 | 34 |
|
61 | | - - name: Check for newly deployed agents |
62 | | - id: check-new-agents |
63 | | - run: | |
64 | | - if git diff --quiet 1-uagents/**.avctl**; then |
65 | | - echo "new=true" >> "$GITHUB_OUTPUT" |
66 | | - else |
67 | | - echo "new=false" >> "$GITHUB_OUTPUT" |
68 | | - fi |
| 35 | + - name: Extract binary and install |
| 36 | + run: | |
| 37 | + tar -xvf avctl_Linux_x86_64.tar.gz |
| 38 | + chmod +x avctl |
| 39 | + mv avctl /usr/local/bin/avctl |
69 | 40 |
|
70 | | - - name: Create Pull Request |
71 | | - uses: peter-evans/create-pull-request@v7 |
72 | | - with: |
73 | | - token: ${{ secrets.GITHUB_TOKEN }} |
74 | | - commit-message: "deploy: add .avctl files for new agents" |
75 | | - title: "deploy: add deployment configuration files for new agents" |
76 | | - body: "This PR adds AVCTL deployment configuration files for new agents." |
77 | | - base: "main" |
78 | | - branch: "chore/deploy-production-agents-${{ github.run_number }}" |
79 | | - add-paths: "1-uagents/**.avctl**" |
80 | | - if: steps.check-new-agents.outputs.new == 'true' |
| 41 | + - name: Authenticate with Agentverse |
| 42 | + run: avctl auth token ${{ secrets.AGENTVERSE_API_KEY }} |
| 43 | + |
| 44 | + - name: Deploy all agents |
| 45 | + run: ./scripts/deploy-all-agents.sh |
| 46 | + env: |
| 47 | + ALPHAVANTAGE_API_KEY: ${{ secrets.ALPHAVANTAGE_API_KEY }} |
| 48 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
| 49 | + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} |
| 50 | + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} |
| 51 | + OCM_API_KEY: ${{ secrets.OCM_API_KEY }} |
| 52 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| 53 | + OPENCAGE_API_KEY: ${{ secrets.OPENCAGE_API_KEY }} |
| 54 | + WEATHERAPI_KEY: ${{ secrets.WEATHERAPI_KEY }} |
| 55 | + HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }} |
| 56 | + GEOAPIFY_API_KEY: ${{ secrets.GEOAPIFY_API_KEY }} |
| 57 | + TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} |
| 58 | + RAPIDAPI_API_KEY: ${{ secrets.RAPIDAPI_API_KEY }} |
| 59 | + SAPLING_API_KEY: ${{ secrets.SAPLING_API_KEY }} |
| 60 | + |
| 61 | + - name: Check for newly deployed agents |
| 62 | + id: check-new-agents |
| 63 | + run: | |
| 64 | + if git diff --quiet 1-uagents/**.avctl**; then |
| 65 | + echo "new=true" >> "$GITHUB_OUTPUT" |
| 66 | + else |
| 67 | + echo "new=false" >> "$GITHUB_OUTPUT" |
| 68 | + fi |
| 69 | +
|
| 70 | + - name: Create Pull Request |
| 71 | + uses: peter-evans/create-pull-request@v7 |
| 72 | + with: |
| 73 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + commit-message: "deploy: add .avctl files for new agents" |
| 75 | + title: "deploy: add deployment configuration files for new agents" |
| 76 | + body: "This PR adds AVCTL deployment configuration files for new agents." |
| 77 | + base: "main" |
| 78 | + branch: "chore/deploy-production-agents-${{ github.run_number }}" |
| 79 | + add-paths: "1-uagents/**.avctl**" |
| 80 | + if: steps.check-new-agents.outputs.new == 'true' |
0 commit comments