Skip to content

fix[actions]: add missing simbol #11

fix[actions]: add missing simbol

fix[actions]: add missing simbol #11

name: "Production Deployment"

Check failure on line 1 in .github/workflows/v11-principal-production-deployment.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/v11-principal-production-deployment.yml

Invalid workflow file

(Line: 57, Col: 19): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
on:
workflow_dispatch:
inputs:
version_tag:
description: "Version to deploy."
required: true
event_processor_tag:
description: "Event processor version to use for this deployment."
required: true
jobs:
validations:
name: Validate permissions
runs-on: ubuntu-24.04
steps:
- name: Check permissions
run: |
echo "Checking permissions..."
if [[ "${{ github.event.inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "✅ Version tag format is correct."
if [[ "${{ github.ref }}" =~ ^refs/heads/main) ]]; then
echo "✅ Base branch ${{ github.ref }} is valid."
else
echo "⛔ ERROR: Base branch ${{ github.ref }} is not valid. It should be main."
exit 1
fi
echo "Validating user permissions..."
RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.json" \
"https://api.github.com/orgs/utmstack/teams/core-developers/memberships/${{ github.actor }}")
if echo "$RESPONSE" | grep -q '"state": "active"'; then
echo "✅ User ${{ github.actor }} is a member of the core-developers team."
else
echo "⛔ ERROR: User ${{ github.actor }} is not a member of the core-developers team."
exit 1
fi
else
echo "⛔ Version tag format is incorrect. It should be in the format vX.Y.Z."
exit 1
fi
deploy:
name: Deploy to Production
needs: validations
uses: ./.github/workflows/v11-used-build.yml
with:
version_tag: ${{ github.event.inputs.version_tag }}
event_processor_tag: ${{ github.event.inputs.event_processor_tag }}
environment: prod
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
secrets:
AGENT_SECRET_PREFIX: ${{ secrets.AGENT_SECRET_PREFIX }}
SIGNER_TOKEN: ${{ secrets.SIGNER_TOKEN }}
CM_AUTH: ${{ secrets.CM_AUTH_ALPHA }}