add sql func to refresh taxa data #248
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: Docker | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| release: | |
| types: [published] | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set IMAGE_NAME | |
| run: echo "IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| ####################################################################### | |
| # RELEASE → build PROD image | |
| ####################################################################### | |
| - name: Build & Push PROD image (release) | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: prod | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} | |
| ####################################################################### | |
| # DEVELOP → build DEV + PREPROD images | |
| ####################################################################### | |
| - name: Build & Push DEV image (develop) | |
| if: github.ref == 'refs/heads/develop' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: dev | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev | |
| - name: Build & Push PREPROD image (develop) | |
| if: github.ref == 'refs/heads/develop' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: preprod | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:preprod |