name: "Deploy" on: push: branches: - master jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} registry: git.fascinated.cc - name: Cache Docker Layers uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - name: Build Image uses: docker/build-push-action@v6 with: context: . push: true tags: git.fascinated.cc/fascinated/scoresaber-reloaded:latest build-args: | GIT_REV=${{ gitea.sha }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - name: Install kubectl uses: azure/setup-kubectl@v4 id: install - name: Setup Kubernetes Context uses: azure/k8s-set-context@v4 with: kubeconfig: ${{ secrets.KUBECONFIG }} - name: Deploy to Kubernetes uses: Azure/k8s-deploy@v5 with: action: deploy namespace: public-services force: true manifests: | .gitea/kubernetes/deployment.yaml .gitea/kubernetes/service.yaml .gitea/kubernetes/ingress.yaml