Skip to content

Building and pushing images to Dockerhub. #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,40 @@ jobs:
cd ${{github.workspace}}/install/bin
./CodeCompass_parser -d "sqlite:database=$HOME/xerces.sqlite" -w $HOME/ws_pgsql/ -n "Xerces-C" -i $HOME/xerces-c -i $HOME/build_xerces-c/compile_commands.json -j $(nproc)

docker:
needs: parse
if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build images
id: docker_build
run: |
docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile .
docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite .
docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache .
docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql .
docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache .
docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push images
run: |
docker push modelcpp/codecompass:dev
docker push modelcpp/codecompass:runtime-sqlite
docker push modelcpp/codecompass:runtime-pgsql
docker push modelcpp/codecompass:web-sqlite
docker push modelcpp/codecompass:web-pgsql
docker push modelcpp/codecompass:latest

tarball:
needs: parse
if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref == 'refs/heads/master' }}
Expand Down