Manual Deploy [hub] #454
Workflow file for this run
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: Manual Deploy [hub] | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: Deployment environment | ||
required: false | ||
default: staging | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: false | ||
default: staging | ||
type: string | ||
permissions: | ||
contents: read | ||
id-token: write | ||
jobs: | ||
build: | ||
name: Build Docker image | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image-server: ${{ steps.build-server.outputs.tag_sha }} | ||
image-worker: ${{ steps.build-worker.outputs.tag_sha }} | ||
image-event-listener: ${{ steps.build-event-listener.outputs.tag_sha }} | ||
image-bot: ${{ steps.build-bot.outputs.tag_sha }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/init | ||
- name: Build | ||
working-directory: packages/hub | ||
run: yarn build | ||
- uses: cardstack/gh-actions/docker-ecr@main | ||
id: build-server | ||
with: | ||
repository: "hub-server-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
dockerfile: "packages/hub/Dockerfile" | ||
context: "packages/hub" | ||
build-args: | | ||
hub_command="server" | ||
- uses: cardstack/gh-actions/docker-ecr@main | ||
id: build-worker | ||
with: | ||
repository: "hub-worker-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
dockerfile: "packages/hub/Dockerfile" | ||
context: "packages/hub" | ||
build-args: | | ||
hub_command="worker" | ||
- uses: cardstack/gh-actions/docker-ecr@main | ||
if: ${{ input.environment == 'production' }} | ||
Check failure on line 59 in .github/workflows/manual-hub.yml GitHub Actions / Manual Deploy [hub]Invalid workflow file
|
||
id: build-event-listener | ||
with: | ||
repository: "hub-event-listener-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
dockerfile: "packages/hub/Dockerfile" | ||
context: "packages/hub" | ||
build-args: | | ||
hub_command="event-listener" | ||
- uses: cardstack/gh-actions/docker-ecr@main | ||
if: ${{ false }} | ||
id: build-bot | ||
with: | ||
repository: "hub-bot-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
dockerfile: "packages/hub/Dockerfile" | ||
context: "packages/hub" | ||
build-args: | | ||
hub_command="bot" | ||
deploy-server: | ||
needs: [build] | ||
name: Deploy hub-server to AWS ECS | ||
uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main | ||
secrets: inherit | ||
with: | ||
container-name: "hub-server" | ||
service-name: "hub-server-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
cluster: ${{ inputs.environment }} | ||
image: ${{ needs.build.outputs.image-server }} | ||
deploy-worker: | ||
needs: [build] | ||
name: Deploy hub-worker to AWS ECS | ||
uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main | ||
secrets: inherit | ||
with: | ||
container-name: "hub-worker" | ||
service-name: "hub-worker-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
cluster: ${{ inputs.environment }} | ||
image: ${{ needs.build.outputs.image-worker }} | ||
deploy-event-listener: | ||
needs: [build] | ||
if: ${{ inputs.environment == 'production' }} | ||
name: Deploy hub-event-listener to AWS ECS | ||
uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main | ||
secrets: inherit | ||
with: | ||
container-name: "hub-event-listener" | ||
service-name: "hub-event-listener-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
cluster: ${{ inputs.environment }} | ||
image: ${{ needs.build.outputs.image-event-listener }} | ||
deploy-bot: | ||
needs: [build] | ||
if: ${{ false }} | ||
name: Deploy hub-bot to AWS ECS | ||
uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main | ||
secrets: inherit | ||
with: | ||
container-name: "hub-bot" | ||
service-name: "hub-bot-${{ inputs.environment }}" | ||
environment: ${{ inputs.environment }} | ||
cluster: ${{ inputs.environment }} | ||
image: ${{ needs.build.outputs.image-bot }} |