feat: move files to datafeeder folder #61
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: build-docker-images.yml | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - '[1-9]+.[0-9]+.x' | |
| tags: | |
| - '*' | |
| jobs: | |
| build-database: | |
| runs-on: ubuntu-latest | |
| name: Build & push database | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Getting image tag | |
| id: version | |
| run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build database | |
| run: | | |
| docker compose --profile datafeeder build database | |
| docker tag datafeeder-database:latest ghcr.io/georchestra/datafeeder/datafeeder-python-database:latest | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push database | |
| run: docker push ghcr.io/georchestra/datafeeder/datafeeder-python-database:latest | |
| - name: Push release | |
| if: endsWith(github.ref, '.x') || github.ref_type == 'tag' | |
| run: | | |
| docker tag ghcr.io/georchestra/datafeeder/datafeeder-python-database:latest ghcr.io/georchestra/datafeeder/datafeeder-python-database:${{ steps.version.outputs.VERSION }} | |
| docker push ghcr.io/georchestra/datafeeder/datafeeder-python-database:${{ steps.version.outputs.VERSION }} | |
| build-frontend: | |
| runs-on: ubuntu-latest | |
| name: Build & push frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Getting image tag | |
| id: version | |
| run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build frontend | |
| run: | | |
| docker compose --profile datafeeder build datafeeder-frontend | |
| docker tag datafeeder-datafeeder-frontend:latest georchestra/datafeeder-python-frontend:latest | |
| - name: "Log in to docker.io" | |
| if: github.repository == 'georchestra/datafeeder' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
| password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
| - name: Push frontend | |
| run: docker push georchestra/datafeeder-python-frontend:latest | |
| - name: Push release | |
| if: endsWith(github.ref, '.x') || github.ref_type == 'tag' | |
| run: | | |
| docker tag georchestra/datafeeder-python-frontend:latest georchestra/datafeeder-python-frontend:${{ steps.version.outputs.VERSION }} | |
| docker push georchestra/datafeeder-python-frontend:${{ steps.version.outputs.VERSION }} | |
| build-backend: | |
| runs-on: ubuntu-latest | |
| name: Build & push backend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Getting image tag | |
| id: version | |
| run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build backend | |
| run: | | |
| docker build -f ./apps/backend/Dockerfile -t georchestra/datafeeder-python-backend:latest --target production . | |
| - name: "Log in to docker.io" | |
| if: github.repository == 'georchestra/datafeeder' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
| password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
| - name: Push backend | |
| run: docker push georchestra/datafeeder-python-backend:latest | |
| - name: Push release | |
| if: endsWith(github.ref, '.x') || github.ref_type == 'tag' | |
| run: | | |
| docker tag georchestra/datafeeder-python-backend:latest georchestra/datafeeder-python-backend:${{ steps.version.outputs.VERSION }} | |
| docker push georchestra/datafeeder-python-backend:${{ steps.version.outputs.VERSION }} | |
| build-airflow: | |
| runs-on: ubuntu-latest | |
| name: Build & push airflow | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Getting image tag | |
| id: version | |
| run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build airflow | |
| run: | | |
| docker build -f ./docker/Dockerfile.airflow -t georchestra/datafeeder-python-airflow:latest --target production . | |
| - name: "Log in to docker.io" | |
| if: github.repository == 'georchestra/datafeeder' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
| password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
| - name: Push airflow | |
| run: docker push georchestra/datafeeder-python-airflow:latest | |
| - name: Push release | |
| if: endsWith(github.ref, '.x') || github.ref_type == 'tag' | |
| run: | | |
| docker tag georchestra/datafeeder-python-airflow:latest georchestra/datafeeder-python-airflow:${{ steps.version.outputs.VERSION }} | |
| docker push georchestra/datafeeder-python-airflow:${{ steps.version.outputs.VERSION }} |