Skip to content

Commit

Permalink
Upload docker image to dev ecr repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rylev committed Jan 11, 2023
1 parent a62096d commit f874100
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Build the Docker image
run: docker build -t docs-rs-web -f dockerfiles/Dockerfile --target web-server .

- name: Upload the Docker image to ECR
- name: Upload the Docker image to ECR (production)
uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master
with:
image: docs-rs-web
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/docker.yml
@@ -1,6 +1,9 @@
name: Docker

on: [push, pull_request]
on:
push:
branches:
- master

jobs:
docker:
Expand All @@ -10,4 +13,15 @@ jobs:
- uses: actions/checkout@v3

- name: Build the Docker image
run: docker build -t docs-rs -f dockerfiles/Dockerfile .
run: docker build -t docs-rs -f dockerfiles/Dockerfile . --target=web-server

- name: Upload the Docker image to ECR (dev)
uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master
with:
image: docs-rs-web
repository: docs-rs-web
region: us-east-1
aws_access_key_id: "${{ secrets.dev_aws_access_key_id }}"
aws_secret_access_key: "${{ secrets.dev_aws_secret_access_key }}"
redeploy_ecs_cluster: docs-rs-staging
redeploy_ecs_service: docs-rs-web

0 comments on commit f874100

Please sign in to comment.