diff options
| author | Syndamia <kamen@syndamia.com> | 2024-08-13 14:27:49 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2024-08-13 14:28:07 +0300 |
| commit | 7e26ccf5311d3c68a13b693c5e2b05c61e31f398 (patch) | |
| tree | 6ae3f238a44f43295eb72232502d764610715893 /.github/workflows/main-branch.yml | |
| parent | d9f35a55008a2c4b2a52a09178efdc95bc11a8b2 (diff) | |
| download | pico-web-7e26ccf5311d3c68a13b693c5e2b05c61e31f398.tar pico-web-7e26ccf5311d3c68a13b693c5e2b05c61e31f398.tar.gz pico-web-7e26ccf5311d3c68a13b693c5e2b05c61e31f398.zip | |
feat!: Major workflow rename, reorder, restructure and README updates
Diffstat (limited to '.github/workflows/main-branch.yml')
| -rw-r--r-- | .github/workflows/main-branch.yml | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml deleted file mode 100644 index aaf378c..0000000 --- a/.github/workflows/main-branch.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Create release and push production server image to dockerhub -on: - push: - branches: - - main -jobs: - Build-docker-and-push: - name: Build the production docker container image and push it to dockerhub - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - uses: docker/build-push-action@v5 - with: - push: true - context: . - file: ./docker/prod/Dockerfile - tags: ${{ secrets.DOCKERHUB_USERNAME }}/pico-web-server:latest - - Release: - name: Make github release - runs-on: ubuntu-latest - needs: Build-docker-and-push - steps: - - uses: actions/checkout@v4 - - uses: rymndhng/release-on-push-action@master - env: - GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} - with: - bump_version_scheme: norelease # PR must have one of these labels: release:major, release:minor, release:patch - - # This emulates deploying to an actual (remote) cluster by first setting up the cluster on older commit and then rolling out current one - Deploy-kubernetes: - name: Deploy kubernetes cluster locally to an action - runs-on: ubuntu-latest - needs: Build-docker-and-push - steps: - # Setup dependencies - - name: Install socat - run: sudo apt-get install -y socat - - uses: medyagh/setup-minikube@master - - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - name: Pull (release) docker image - run: | - docker pull ${{ secrets.DOCKERHUB_USERNAME }}/pico-web-server:latest - - name: Configure demo data - run: | - minikube cp ./demo/index.md /usr/share/demo/ - - # Setup old deployment - - name: Checkout previous commit - run: | - git checkout HEAD^ - # Deploy previous version - - name: Minikube deploy - run: | - kubectl apply -f kubernetes/ - kubectl rollout status deployment/pico-web-server-deployment - - name: Using cluster - run: | - kubectl get all - echo -ne 'demo@/' | socat STDIO TCP:$(minikube service pico-web-server-service --url | cut -d/ -f3-) - - # Setup current deployment - - name: Checkout current - run: | - git checkout main - # Deploy current version - - name: Minikube deploy - run: | - kubectl apply -f kubernetes/ - kubectl rollout status deployment/pico-web-server-deployment - - name: Using cluster - run: | - kubectl get all - echo -ne 'demo@/' | socat STDIO TCP:$(minikube service pico-web-server-service --url | cut -d/ -f3-) - - # End - - name: Minikube stop - run: | - minikube stop |
