Skip to content

Commit

Permalink
workflow files updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaerbay committed Feb 27, 2022
1 parent 6c0853f commit 3cba367
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 46 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: ci to Docker Hub

on:
push:
Expand All @@ -7,6 +7,8 @@ on:

env:
TEST_TAG: test_github
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_USER: postgres

jobs:
docker:
Expand All @@ -15,8 +17,8 @@ jobs:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand Down Expand Up @@ -61,15 +63,6 @@ jobs:
context: ./test-app
load: true
tags: faceit:${{ env.TEST_TAG }}

# -
# name: Run Postgresql container
# run: |
# docker run --rm --name=postrgres -p 5432:5432 --network host -e POSTGRES_PASSWORD=mysecretpassword -d postgres:13-alpine
# -
# name: wait Postgresql container
# run: |
# sleep 10
-
name: Test
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/push_image_to_ecr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy to ECR

on:
push:
branches: [ main ]

jobs:

build:

name: Build Image
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: faceit
IMAGE_TAG: latest
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4 changes: 2 additions & 2 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: 'Terraform'
on:
push:
branches:
- main
- prod
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.FACE_DEMO_GITHUB_TOKEN }}
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/terraform_test.yml

This file was deleted.

0 comments on commit 3cba367

Please sign in to comment.