diff --git a/.github/workflows/prod-publish.yml b/.github/workflows/prod-publish.yml new file mode 100644 index 00000000..37afbc92 --- /dev/null +++ b/.github/workflows/prod-publish.yml @@ -0,0 +1,31 @@ +name: Prod Publish + +on: + push: + branches: + - 'main' + +jobs: + prod-publish: + name: Prod Publish + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v5.0.0 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v2 + with: + registry-type: public + + - name: Build and push Docker image + run: | + docker build -f tueri_api/Dockerfile -t public.ecr.aws/microhealthllc/tueri:latest . + docker push public.ecr.aws/microhealthllc/tueri:latest diff --git a/.github/workflows/qa-publish.yml b/.github/workflows/qa-publish.yml new file mode 100644 index 00000000..4ff7031b --- /dev/null +++ b/.github/workflows/qa-publish.yml @@ -0,0 +1,31 @@ +name: QA Publish + +on: + push: + branches: + - 'release' + +jobs: + qa-publish: + name: QA Publish + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v5.0.0 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v2 + with: + registry-type: public + + - name: Build and push Docker image + run: | + docker build -f tueri_api/Dockerfile -t public.ecr.aws/microhealthllc/tueri:qa . + docker push public.ecr.aws/microhealthllc/tueri:qa