admin can't change his own role #47
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: | |
branches: ["master"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
POETRY_NO_INTERACTION: 1 | |
POETRY_VIRTUALENVS_IN_PROJECT: 1 | |
POETRY_VIRTUALENVS_CREATE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install python3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: install dependencies | |
run: poetry install --no-cache | |
- name: Run tests | |
run: poetry run python -m pytest | |
docker-build: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ${{ secrets.DOCKERHUB_TARGET }} |