Added pulumi #344
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: Docker Image CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Log into Docker Hub Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.TFDOCKERHUB_USERNAME }} | |
password: ${{ secrets.TFDOCKERHUB_PASSWORD }} | |
- name: Build the Docker image | |
run: docker build . -t threefolddev/threefold-connect-news:${{ github.sha }} | |
- name: Push to dockerhub | |
run: docker push threefolddev/threefold-connect-news:${{ github.sha }} | |
- name: Push latest to dockerhub | |
run: | | |
docker tag threefolddev/threefold-connect-news:${{ github.sha }} threefolddev/threefold-connect-news:latest | |
docker push threefolddev/threefold-connect-news:latest | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create kubeconfig | |
run: | | |
mkdir ${HOME}/.kube | |
echo ${{ secrets.TF_KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config | |
- name: deploy to kubernetes jimber namespace | |
run: helm upgrade news --install helm_files -f helm_files/valuesProduction.yaml --set image.tag=${{ github.sha }} -n jimber |