-
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.
Add Github workflow to build and publish Docker images
- Loading branch information
1 parent
38c65d0
commit 7b2f2fe
Showing
3 changed files
with
77 additions
and
16 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,53 @@ | ||
name: Docker build & publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Define metadata (tags) for Docker | ||
id: meta | ||
run: | | ||
TAG="latest" | ||
if [ "${{ github.ref_type }}" == "tag" ]; then | ||
TAG=${{ github.ref_name }} | ||
fi | ||
echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
- name: Build and push Docker server image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/media-gateway-server:${{ steps.meta.outputs.tag}} | ||
build-args: | | ||
TYPE=server | ||
- name: Build and push Docker client image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/media-gateway-client:${{ steps.meta.outputs.tag}} | ||
build-args: | | ||
TYPE=client |
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
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,20 @@ | ||
# Benchmarking | ||
|
||
Benchmark tests use Docker images built locally from sources. | ||
|
||
## Server | ||
|
||
To build Docker image for the server | ||
|
||
```bash | ||
docker build --build-arg="TYPE=server" -t media-gateway-server:latest . | ||
``` | ||
|
||
## Client | ||
|
||
To build Docker image for the client | ||
|
||
```bash | ||
docker build --build-arg="TYPE=client" -t media-gateway-client:latest . | ||
``` | ||
|