Skip to main content
Glama
set-service-version.yml2.02 kB
name: Set Service Version run-name: Setting ${{ inputs.service }} to version {{ inputs.version }} for {{ inputs.environment }} # Required for IDP JWT and actions/checkout permissions: id-token: write contents: read on: workflow_call: inputs: environment: type: string required: true description: "where to deploy" service: type: string required: true description: "service to deploy" version: type: string required: true description: "version to deploy" jobs: deploy: name: Set service version environment: ${{ inputs.environment }} runs-on: ubuntu-latest steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ vars.AWS_ASSUME_ROLE_ARN }} role-session-name: GitHub_to_AWS_via_FederatedOIDC aws-region: us-east-1 - name: Set service version run: | check_version_exists() { local type local version local service local URL local check version="$1" service="$2" URL="https://artifacts.systeminit.com/${service}/${version}/${type}/linux/x86_64/${service}-${version}-${type}-linux-x86_64.tar.gz" check=$(curl -s -o /dev/null -w "%{http_code}" "$URL") [[ "$check" -eq 200 || "$check" -eq 301 ]] } ENVIRONMENT="${{ inputs.environment }}" VERSION="${{ inputs.version }}" SERVICE="${{ inputs.service }}" ARTIFACT_TYPE=$(aws ssm get-parameter --query "Parameter.Value" --output text --name "$ENVIRONMENT-binary-type") if check_version_exists "$ARTIFACT_TYPE" "$VERSION" "$SERVICE"; then aws ssm put-parameter --name "${ENVIRONMENT}-si-version-${SERVICE}" --value "${VERSION}" --type "String" --overwrite fi

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server