Merge pull request #15 from DermAlert/development #44
This file contains hidden or 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/CD (main -> GitLab Registry) | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
# build-and-test: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: "3.11" | |
# | |
# - name: Install Poetry | |
# run: | | |
# pip install --upgrade pip | |
# pip install poetry | |
# | |
# - name: Install dependencies | |
# working-directory: project | |
# run: | | |
# poetry install --no-root | |
# | |
# - name: Run tests | |
# working-directory: project | |
# run: | | |
# poetry run pytest --maxfail=1 --disable-warnings -q | |
docker-build-and-push: | |
runs-on: ubuntu-latest | |
# needs: build-and-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Log in to GitLab Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.gitlab.com | |
username: ${{ secrets.GITLAB_USERNAME }} | |
password: ${{ secrets.GITLAB_PASSWORD }} | |
- name: Build Docker image | |
working-directory: project | |
run: | | |
docker build -t registry.gitlab.com/lappis-unb/decidimbr/dermalert:latest . | |
- name: Push Docker image | |
working-directory: project | |
run: | | |
docker push registry.gitlab.com/lappis-unb/decidimbr/dermalert:latest |