Skip to content

Commit

Permalink
testing primary action
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbass committed Apr 1, 2024
1 parent 4a25dfe commit 18b346f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/primary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ jobs:
if: github.ref == 'refs/heads/main' && (needs.detect-changes.outputs.run-backend == 'true' || needs.detect-changes.outputs.run-frontend == 'true')
uses: ./.github/workflows/ci-tests.yaml

verify-backend:
needs: detect-changes
if: github.ref != 'refs/heads/main' && needs.detect-changes.outputs.run-backend == 'true'
strategy:
max-parallel: 1
matrix:
environment: [stage, production]
uses: ./.github/workflows/verify-backend.yaml
with:
tf_version: 1.6.2
tg_version: 0.55.15
aws_region: us-east-1
environment: ${{ matrix.environment }}
secrets: inherit

deploy-backend:
needs: detect-changes
if: github.ref == 'refs/heads/main' && needs.detect-changes.outputs.run-backend == 'true'
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/verify-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ permissions:
contents: read

jobs:
deploy-backend:
validate-backend:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -65,19 +65,6 @@ jobs:
with:
mask-password: 'true'

- name: Build, tag, and push backend image to Amazon ECR
id: build-backend
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: backend-${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./backend -f ./backend/deploy.dockerfile
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image_backend=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: backend-service
working-directory: ./tofu/environments/${{inputs.environment}}/services/backend-service
run: |
Expand Down

0 comments on commit 18b346f

Please sign in to comment.