Update thepercyj-esrs-group-9-main-example-environment-branch-workflo… #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Architect main Branch Deployment | |
on: | |
push: | |
branches: | |
- main | |
env: | |
ARCHITECT_GENERATED: true | |
ARCHITECT_BRANCH: true | |
COMPONENT_FILE_PATH: architect.yml | |
ARCHITECT_ACCOUNT: thepercyj | |
COMPONENT_NAME: esrs-group-9 | |
ENVIRONMENT_NAME: production | |
BRANCH_NAME: main | |
CLUSTER_NAME: architect | |
jobs: | |
architect_create_branch_deployments: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH_NAME }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: crazy-max/ghaction-github-runtime@v2 # Exports internal envs for Github Actions. Required for register caching to work. | |
- name: Install Architect CLI | |
run: npm install -g @architect-io/cli | |
- name: Login to Architect Cloud | |
run: architect login -e ${{ secrets.ARCHITECT_EMAIL }} -p ${{ secrets.ARCHITECT_PASSWORD }} # These secrets were created on your behalf | |
- name: Register component w/ Architect | |
run: architect register ${{ env.COMPONENT_FILE_PATH }} -t latest | |
- name: An environment created automatically by a GitHub branch workflow to facilitate automated component deployments | |
run: architect environment:create --cluster=${{ env.CLUSTER_NAME }} --description="Architect workflow environment" ${{ env.ENVIRONMENT_NAME }} | |
- name: Deploy component | |
run: architect deploy --auto-approve -e ${{ env.ENVIRONMENT_NAME }} ${{ env.COMPONENT_NAME }}:latest |