forked from dedis/d-voting
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add Docker image building to CI
- Loading branch information
1 parent
1b32705
commit d2d7a69
Showing
1 changed file
with
45 additions
and
0 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: Build docker | ||
|
||
on: push | ||
|
||
jobs: | ||
build-docker: | ||
name: Build docker image | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: Dockerfiles/Dockerfile.frontend | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ghcr.io/c4dt/d-voting-frontend:latest | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: Dockerfiles/Dockerfile.backend | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ghcr.io/c4dt/d-voting-backend:latest | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
target: production | ||
file: Dockerfiles/Dockerfile.dela | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ghcr.io/c4dt/d-voting-dela:latest |