Skip to content

Commit

Permalink
strip out old GHA workflows; add CICD foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk-tbot committed Jan 3, 2024
1 parent 3002845 commit a238df0
Show file tree
Hide file tree
Showing 29 changed files with 410 additions and 1,533 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: AWS Build and Deploy

on:
push:
branches: ["staging", "production"]

jobs:
build-and-push:
permissions:
id-token: write
contents: read
checks: write
name: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/ecr.yml
with:
build_role: arn:aws:iam::458591407913:role/github-actions-ecr-thoughtbot-mastodon
ecr_repo: thoughtbot/thoughtbot-mastodon

deploy-staging:
if: ${{ endsWith(github.ref, 'staging') }}
permissions:
contents: read
id-token: write
actions: read
name: deploy-staging
needs: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/eks.yml
with:
cluster_name: thoughtbot-sandbox-v1
deploy_role: arn:aws:iam::181682000713:role/thoughtbot-mastodon-deploy
image_url: ${{ needs.build-and-push.outputs.image_url }}
manifest_path: ./deploy/staging
namespace: thoughtbot-mastodon-staging
registry_account: '458591407913'
version: ${{ needs.build-and-push.outputs.version }}

deploy-production:
if: ${{ endsWith(github.ref, 'production') }}
permissions:
contents: read
id-token: write
actions: read
name: deploy-production
needs: build-and-push
concurrency: ${{ github.ref }}
uses: ./.github/workflows/eks.yml
with:
cluster_name: thoughtbot-production-v1
deploy_role: arn:aws:iam::651913466569:role/thoughtbot-mastodon-deploy
image_url: ${{ needs.build-and-push.outputs.image_url }}
manifest_path: ./deploy/production
namespace: thoughtbot-mastodon-production
registry_account: '458591407913'
version: ${{ needs.build-and-push.outputs.version }}
99 changes: 0 additions & 99 deletions .github/workflows/build-container-image.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/build-nightly.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/build-push-pr.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/build-releases.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/bundler-audit.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/check-i18n.yml

This file was deleted.

Loading

0 comments on commit a238df0

Please sign in to comment.