Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

CI for deploy to devtest (#574)

Sujai Kumar Guptaaf7267b52047
diff --git a/.github/workflows/deploy-devtest.yml b/.github/workflows/deploy-devtest.yml
new file mode 100644
index 000000000..c247b1173
--- /dev/null
+++ b/.github/workflows/deploy-devtest.yml
@@ -0,0 +1,61 @@
+name: Sync commit to trueforge-devtest-deployment
+
+on:
+ workflow_dispatch:
+ push:
+ branches: [main]
+
+concurrency:
+ group: deploy-devtest
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ sync:
+ name: Pin SHA and push
+ runs-on: ubuntu-latest
+ steps:
+ - id: app-token
+ uses: actions/create-github-app-token@v3
+ with:
+ client-id: ${{ secrets.TRUEFORGE_GENERATE_SDK_APP_ID }}
+ private-key: ${{ secrets.TRUEFORGE_GENERATE_SDK_APP_PRIVATE_KEY }}
+ owner: truefoundry
+ repositories: trueforge-devtest-deployment
+
+ - uses: actions/checkout@v7
+ with:
+ repository: truefoundry/trueforge-devtest-deployment
+ token: ${{ steps.app-token.outputs.token }}
+
+ - name: Install yq
+ run: |
+ sudo wget -q https://github.com/mikefarah/yq/releases/download/v4.53.3/yq_linux_amd64 -O /usr/bin/yq
+ sudo chmod +x /usr/bin/yq
+
+ - name: Pin trueforge SHA and push
+ env:
+ SHA: ${{ github.sha }}
+ BRANCH: ${{ github.ref_name }}
+ APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
+ run: |
+ set -euo pipefail
+ for f in trueforge.truefoundry.yaml trueforge-controller.truefoundry.yaml; do
+ yq -i '
+ .image.build_source.ref = strenv(SHA) |
+ .image.build_source.branch_name = strenv(BRANCH)
+ ' "$f"
+ done
+
+ git config user.name "${APP_SLUG}[bot]"
+ git config user.email "${APP_SLUG}[bot]@users.noreply.github.com"
+ git add trueforge.truefoundry.yaml trueforge-controller.truefoundry.yaml
+ if git diff --cached --quiet; then
+ echo "Already pinned at $SHA"
+ exit 0
+ fi
+ git commit -m "chore: pin trueforge@${SHA}"
+ git push
+ echo "Pinned trueforge@\`$SHA\` on main" >> "$GITHUB_STEP_SUMMARY"