Skip to content

March News & updates done #329

March News & updates done

March News & updates done #329

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag threefoldjimber/threefold-connect-news:${{ github.sha }}
- name: Log into GitHub Container Registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Push to dockerhub
run: docker push threefoldjimber/threefold-connect-news:${{ github.sha }}
- name: Push latest to dockerhub
run: |
docker tag threefoldjimber/threefold-connect-news:${{ github.sha }} threefoldjimber/threefold-connect-news:latest
docker push threefoldjimber/threefold-connect-news:latest
# deploy:
# needs: [build]
# runs-on: whale-replacement
# steps:
# - name: remove current running container
# run: docker rm -f threefold-connect-news
# - name: run container
# run: docker run -d --restart unless-stopped --name threefold-connect-news --network 3proxynet threefoldjimber/threefold-connect-news:${{ github.sha }}
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create kubeconfig
run: |
mkdir ${HOME}/.kube
echo ${{ secrets.KUBE_KEY }} | base64 --decode > ${HOME}/.kube/jimber-prod2.key
echo ${HOME}/.kube/jimber-prod2.key
echo ${{ secrets.KUBE_CRT }} | base64 --decode > ${HOME}/.kube/jimber-prod2.crt
echo ${HOME}/.kube/jimber-prod2.crt
- name: context
run: |
echo ${{ secrets.KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config
cat ${HOME}/.kube/config
- name: deploy to kubernetes
run: helm upgrade news helm_files --set image.tag=${{ github.sha }} -n jimber