Add Notubiz gemeenten #476 #111
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 ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
# openstatefoundation/open-raadsinformatie | |
IMAGE_NAME: ${{ github.repository }} | |
# ghcr.io/openstatefoundation/open-raadsinformatie | |
FULL_IMAGE_NAME: ghcr.io/${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
sudo docker pull openstatefoundation/open-raadsinformatie-backend:build-tmp | |
sudo docker-compose build | |
sudo docker-compose -f docker-compose.yml -f docker-compose.test.yml up --build -d | |
sleep 4 && docker ps -a | |
APP_VERSION=$(python -c "import version; import sys; sys.path.insert(0, '/opt/ori'); print(version.__version__)") | |
- name: Test & Lint | |
run: | | |
docker exec ori_backend_1 bin/run_tests.sh 2>&1 | |
docker exec ori_backend_1 pylint ocd_backend -E -sy | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
with: | |
images: ${{ env.FULL_IMAGE_NAME }} | |
- name: Push docker images | |
run: | | |
docker push ${{ env.FULL_IMAGE_NAME }}:latest | |
docker tag ${{ env.FULL_IMAGE_NAME }}:latest ${{ env.FULL_IMAGE_NAME }}:run${{ github.run_number }} | |
docker push ${{ env.FULL_IMAGE_NAME }}:run${{ github.run_number }} | |
docker tag ${{ env.FULL_IMAGE_NAME }}:latest ${{ env.FULL_IMAGE_NAME }}:build-tmp | |
docker push ${{ env.FULL_IMAGE_NAME }}:build-tmp |