-
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.
- Loading branch information
Showing
5 changed files
with
153 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,43 @@ | ||
name: Mongo Development Docker Image CD | ||
|
||
on: | ||
push: | ||
branches: [ dev ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mongo-docker-cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker meta data | ||
id: docker-meta-data | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: codexrems/mongo | ||
flavor: latest=false | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push mongo Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile.mongo | ||
push: true | ||
tags: codexrems/mongo:experimental | ||
labels: ${{ steps.docker-meta-data.outputs.labels }} | ||
|
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,44 @@ | ||
name: Mongo Docker Image CD | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mongo-docker-cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Docker meta data | ||
id: docker-meta-data | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: codexrems/mongo | ||
flavor: latest=false | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push Mongo Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile.mongo | ||
push: true | ||
tags: codexrems/mongo:latest | ||
labels: ${{ steps.docker-meta-data.outputs.labels }} | ||
|
||
|
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,19 @@ | ||
name: Mongo Docker Image CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ main, dev ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Test Server Docker image Builds | ||
run: docker build -f Dockerfile.mongo . |
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,42 @@ | ||
name: Mongo Docker Tagged Image CD | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker meta data | ||
id: docker-meta-data | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: codexrems/mongo | ||
flavor: latest=false | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile.mongo | ||
tags: ${{ steps.docker-meta-data.outputs.tags }} | ||
labels: ${{ steps.docker-meta-data.outputs.labels }} |
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,5 @@ | ||
FROM mongo:latest | ||
|
||
ENV MONGO_INITDB_ROOT_USERNAME=mongo-user | ||
ENV MONGO_INITDB_ROOT_PASSWORD=mongo-password | ||
COPY ./mongo-init.js /docker-entrypoint-initdb.d/mongo-init.js |