Build & Deploy to Scaleway #1
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: Build & Deploy to Scaleway | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- main | |
# to be able to force deploy | |
workflow_dispatch: | |
env: | |
PYTHON_VERSION: '3.11' | |
POETRY_VERSION: '1.6.1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/checkout@v4 | |
- name: Login to Scaleway Container Registry | |
uses: docker/login-action@v3 | |
with: | |
username: nologin | |
password: ${{ secrets.SCALEWAY_API_KEY }} | |
registry: ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }} | |
- name: Build ingest_to_db image | |
run: docker build -f Dockerfile_ingest . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db | |
- name: Push ingest_to_db Image | |
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db | |
- name: Build streamlit image | |
run: docker build -f Dockerfile_streamlit . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/streamlit | |
- name: Push streamlit Image | |
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/streamlit | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Poetry install & bump version | |
run: | | |
poetry install --only dev | |
poetry version patch | |
git config user.name barometre-github-actions | |
git config user.email [email protected] | |
git add pyproject.toml | |
git commit -m "[no ci]: bumping version" | |
git push origin main |