actions-aws-eb
actions-aws-eb copied to clipboard
actions error
This is my workflow file and i am getting this error: ERROR: This branch does not have a default environment. You must either specify an environment by typing "eb deploy my-env-name" or set a default environment by typing "eb use my-env-name". name: Deploy to EBS
on: push: branches: [dev, qa, uat, prod]
env: CERTIFICATE_ARN: ${{secrets.CERTIFICATE_ARN}}
jobs: update_environment: if: github.ref_name != 'dev' || contains(github.event.head_commit.message, 'ci:') runs-on: ubuntu-latest steps: - name: Slack Notify Starting if: success() id: slack env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} uses: Discontract/[email protected] with: channel: github-actions status: STARTED color: warning
- name: Checkout Full Repo
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: "npm ci"
- run: "npm run build"
- run: "mv .elasticbeanstalk/deploy-config.yml .elasticbeanstalk/config.yml"
- run: "sed -i 's|${AWS_SECRET_MANAGER_ID}|'capi-${GITHUB_REF##*/}'|g' ./.ebextensions/options.config"
- run: "sed -i 's|${CERTIFICATE_ARN}|'$CERTIFICATE_ARN'|g' ./.ebextensions/https-redirect.config"
- name: Elastic Beanstalk Deployment
uses: hmanzur/[email protected]
with:
command: deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.EB_DEPLOY_ACCESS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.EB_DEPLOY_SECRET }}
AWS_DEFAULT_REGION: "us-west-2"
- name: Slack Notify Success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: Discontract/[email protected]
with:
channel: github-actions
status: SUCCESS
color: good
- name: Slack Notify Failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: Discontract/[email protected]
with:
channel: github-actions
status: FAILED
color: danger