Add Github actions to build and push images to Docker Hub (#1)

Signed-off-by: Sebastiano Mariani <smariani@vmware.com>
pull/1/head
Sebastiano Mariani 2022-11-15 13:49:39 -08:00 committed by Sebastiano Mariani
parent 07c886b1ba
commit e4bafc776e
4 changed files with 45 additions and 4 deletions

23
.github/workflows/release-latest.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Build the Docker images and push them to Docker Hub
on:
# Only trigger the workflow when there is a new commit to the master branch
push:
branches: [ "master" ]
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# checkout the repository in the ubuntu-latest environment
- uses: actions/checkout@v3
- name: Build the Docker images
run: docker compose --file build-docker-compose.yml --env-file template.env build
- name: Push the Docker images to Docker Hub
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker compose -f build-docker-compose.yml push

18
.github/workflows/test-build-latest.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Build the Docker images
on:
# Only trigger the workflow when there is a PR on the master branch
pull_request:
branches: [ "master" ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# checkout the repository in the ubuntu-latest environment
- uses: actions/checkout@v3
- name: Build the Docker images
run: docker compose --file build-docker-compose.yml --env-file template.env build

View File

@ -1,7 +1,7 @@
version: '3'
services:
misp:
image: coolacid/misp-docker:core-latest
image: ostefano/misp-docker:core-latest
build:
context: server/.
args:
@ -10,7 +10,7 @@ services:
- PHP_VER=${PHP_VER}
misp-modules:
image: coolacid/misp-docker:modules-latest
image: ostefano/misp-docker:modules-latest
build:
context: modules/.
args:

View File

@ -29,7 +29,7 @@ services:
- SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log
misp:
image: coolacid/misp-docker:core-latest
image: ostefano/misp-docker:core-latest
depends_on:
- redis
- db
@ -86,7 +86,7 @@ services:
- "NSX_ANALYSIS_KEY=${NSX_ANALYSIS_KEY}"
- "VIRUSTOTAL_KEY=${VIRUSTOTAL_KEY}"
misp-modules:
image: coolacid/misp-docker:modules-latest
image: ostefano/misp-docker:modules-latest
environment:
- "REDIS_BACKEND=redis"
depends_on: