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 and Deploy Containers | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 the Docker images | |
run: | | |
docker build . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/so-insights-api -f api.Dockerfile | |
docker build . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/so-insights-frontend -f frontend.Dockerfile | |
- name: Push the Docker Images | |
run: | | |
docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/so-insights-api | |
docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/so-insights-frontend | |