Skip to content

Commit

Permalink
Merge pull request #46 from arconsis/SBE-44-fix-ecr
Browse files Browse the repository at this point in the history
Fix terraform ecr github action to only be triggered manually
  • Loading branch information
akoufa authored Oct 23, 2023
2 parents f9d5090 + 6eaf5da commit d61f5ee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/terraform-ecr.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "Terraform ECR"

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
repository-names:
description: "The name of all the ECR repositories needed e.g.: 'bookstore-quarkus,bookstore-springboot' "
type: "string"

jobs:
terraform:
Expand Down Expand Up @@ -106,6 +107,8 @@ jobs:
working-directory: ./terraform/ecr_repositories

- name: Terraform Apply
env:
REPOSITORY_NAMES: ${{ inputs.repository-names }}
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: terraform apply -auto-approve -input=false
run: terraform apply -auto-approve -input=false -var="repositories=[REPOSITORY_NAMES]"
working-directory: ./terraform/ecr_repositories

0 comments on commit d61f5ee

Please sign in to comment.