Remove extraneous mapping #78
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: MovieTheater Prod Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
validate-gql-schema: | |
runs-on: ubuntu-latest | |
container: mcr.microsoft.com/dotnet/sdk:6.0 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: cd src/MovieTheater; cp appsettings.default.json appsettings.Development.json; dotnet run export gql ../ui/src/schema-new.graphql | |
- run: cd src/ui/src; diff schema.graphql schema-new.graphql | |
docker-build-api: | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- uses: actions/checkout@v2 | |
- run: echo $MOVIETHEATER_APPSETTINGS_JSON > src/MovieTheater/appsettings.Production.json | |
env: | |
MOVIETHEATER_APPSETTINGS_JSON: ${{ secrets.MOVIETHEATER_APPSETTINGS_JSON }} | |
- run: cd docker && bash build-api.sh | |
- run: docker push localhost:32000/movietheater-api:$GITHUB_SHA | |
docker-build-ui: | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- uses: actions/checkout@v2 | |
- run: cd docker && bash build-ui.sh | |
- run: docker push localhost:32000/movietheater-ui:$GITHUB_SHA | |
k8s-deploy: | |
needs: [validate-gql-schema, docker-build-api, docker-build-ui] | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- run: microk8s kubectl create namespace movietheater --dry-run=client -o yaml | microk8s kubectl apply -f - | |
- run: envsubst < k8s/deployment.yaml | microk8s kubectl apply -n movietheater -f - | |
- run: envsubst < k8s/service.yaml | microk8s kubectl apply -n movietheater -f - | |
- run: microk8s kubectl rollout status -n movietheater deployment/movietheater |