Unit test for all classifier imports (and fixes) #66
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 Build" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - | |
| name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: photonixapp/photonix | |
| tags: | | |
| type=raw,value=edge,enable={{is_default_branch}} | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| - | |
| name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - | |
| name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./docker/Dockerfile.prd | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| deploy-k8s: | |
| needs: build-and-push | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Set up kubectl | |
| uses: azure/setup-kubectl@v3 | |
| - | |
| name: Set up kubeconfig | |
| uses: azure/k8s-set-context@v4 | |
| with: | |
| method: kubeconfig | |
| kubeconfig: ${{ secrets.KUBE_CONFIG }} | |
| - | |
| name: Deploy | |
| run: | | |
| echo "Deploying image: photonixapp/photonix:latest" | |
| kubectl set image deployment/photonix-demo photonix-demo=photonixapp/photonix:latest -n photonix | |
| kubectl rollout restart deployment/photonix-demo -n photonix | |
| - | |
| name: Wait for pod to start | |
| run: | | |
| echo "Waiting for photonix-demo deployment to complete..." | |
| kubectl rollout status deployment/photonix-demo -n photonix --timeout=600s |