Merge pull request #25 from dasch-swiss/dependabot/pip/flask-cors-4.0.1 #22
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
name: CI | |
on: [push] | |
jobs: | |
test: | |
name: Disk Free and Run daschiiify Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Disk Free | |
run: | | |
df -h | |
docker system df | |
docker system prune --all --force --volumes | |
df -h | |
- name: Run daschiiify unit tests | |
run: make test | |
- name: Disk Free After | |
run: | | |
df -h | |
docker system df | |
# Publish only for main branch and tags | |
publish: | |
name: Publish to Dockerhub | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 50 | |
- name: Disk Free | |
run: | | |
df -h | |
docker system df | |
docker system prune --all --force --volumes | |
df -h | |
- name: Build and publish daschiiify Docker image to Dockerhub | |
run: | | |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin | |
docker build --no-cache -t daschswiss/daschiiify:${{ github.ref_name }} . | |
docker tag daschswiss/daschiiify:${{ github.ref_name }} daschswiss/daschiiify:latest | |
docker push daschswiss/daschiiify:${{ github.ref_name }} | |
- name: Disk Free After | |
run: | | |
df -h | |
docker system df |