Skip to content

ci: update workflow branches #1

ci: update workflow branches

ci: update workflow branches #1

name: self-service build and publish
env:
DEFAULT_BRANCH: develop
on:
pull_request:
branches:
- develop
types:
- closed
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
CIRCLECI_TOKEN: ${{ secrets.CIRCLECI_API_TOKEN }}
DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }}

Check failure on line 19 in .github/workflows/self-service-publish.yml

View workflow run for this annotation

GitHub Actions / self-service build and publish

Invalid workflow file

The workflow is not valid. .github/workflows/self-service-publish.yml (Line: 19, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEFAULT_BRANCH
steps:
- name: Check if the source branch is a release branch
run: |
PR_BRANCH="${{ github.event.pull_request.head.ref }}"
echo "Source branch is $PR_BRANCH"
if [[ "$PR_BRANCH" == release/* ]]; then
echo "The source branch is a release branch, proceed with deployment."
curl -d '{\"branch\": \"${DEFAULT_BRANCH}\", \"parameters\": {\"run_deploy_prod\": true}}' \
-H 'Content-Type: application/json' \
-H 'Circle-Token: ${CIRCLECI_TOKEN}' \
-X POST https://circleci.com/api/v2/project/gh/sendbird/chat-ai-widget/pipeline
else
echo "The source branch is not a release branch, skipping deployment."
exit 0
fi