Skip to content

Commit

Permalink
ci: update github action config
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkafadar committed Jan 21, 2024
1 parent 57baf89 commit 5fd5482
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ on:
branches: [ "main" ]

env:
AWS_REGION: MY_AWS_REGION
ECR_REPOSITORY: MY_ECR_REPOSITORY
ECS_SERVICE: MY_ECS_SERVICE
ECS_CLUSTER: MY_ECS_CLUSTER
ECS_TASK_DEFINITION: MY_ECS_TASK_DEFINITION

CONTAINER_NAME: MY_CONTAINER_NAME

ECR_REPOSITORY: {{ secrets.MY_ECR_REPOSITORY }}
ECS_SERVICE: {{ secrets.MY_ECS_SERVICE }}
ECS_CLUSTER: MY_ECS_CLUSTER
ECS_TASK_DEFINITION: {{ secrets.MY_ECS_TASK_DEFINITION }}

CONTAINER_NAME: {{ secrets.MY_CONTAINER_NAME }}


permissions:
contents: read
Expand All @@ -32,7 +31,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
Expand All @@ -55,14 +54,14 @@ jobs:
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
container-name: ${{ env.CONTAINER_NAME }}
task-definition: ${{ secrets.ECS_TASK_DEFINITION }}
container-name: ${{ secrets.CONTAINER_NAME }}
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
service: ${{ secrets.ECS_SERVICE }}
cluster: ${{ secrets.ECS_CLUSTER }}
wait-for-service-stability: true
2 changes: 1 addition & 1 deletion src/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub async fn run_http_server() -> std::io::Result<()> {
.service(health)
.service(handle_gitlab_webhook)
})
.bind(("127.0.0.1", 8080))?
.bind(("0.0.0.0", 8080))?
.run()
.await
}
Expand Down

0 comments on commit 5fd5482

Please sign in to comment.