feat: build docker container in CI

This commit is contained in:
Aravinth Manivannan 2022-05-23 18:54:13 +05:30
parent ff3963f798
commit 61b29ec4e1
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 29 additions and 14 deletions

15
.dockerignore Normal file
View file

@ -0,0 +1,15 @@
**/target
tarpaulin-report.html
.env
cobertura.xml
prod/
node_modules/
/static-assets/bundle
./templates/**/*.js
/static/cache/bundle/*
src/cache_buster_data.json
browser/target
browser/cobertura.xml
browser/docs
**/tmp/

View file

@ -48,12 +48,12 @@ jobs:
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - name: Login to DockerHub
# if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
@ -83,14 +83,14 @@ jobs:
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
# - name: build docker images
# if: matrix.version == 'stable'
# run: make docker
#
# - name: publish docker images
# if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
# run: make docker-publish
#
- name: build docker images
if: matrix.version == 'stable'
run: make docker
- name: publish docker images
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
run: make docker-publish
- name: run tests
timeout-minutes: 40
run: