-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from AutomatingSciencePipeline/docker-build-ci
Docker build ci
- Loading branch information
Showing
4 changed files
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Docker Container Build | ||
|
||
# Adapted from https://docs.docker.com/build/ci/github-actions/ | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
jobs: | ||
backend-prod: | ||
name: Backend Production Container | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: false # Don't push to a container registry (we don't have that set up yet) | ||
# Should match our build settings in docker-compose.yml | ||
context: ./apps/backend | ||
file: ./apps/backend/backend.Dockerfile | ||
target: production | ||
frontend-prod: | ||
name: Frontend Production Container | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: false | ||
# Should match our build settings in docker-compose.yml | ||
context: ./apps/frontend | ||
file: ./apps/frontend/frontend.Dockerfile | ||
target: runner |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters