-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding staging tfconnect-news workflow on prod2 ns threefoldconnect-s…
…taging
- Loading branch information
1 parent
0f0da24
commit e0560d1
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: News Staging | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | ||
|
||
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/staging-threefold-connect-news:${{ github.sha }} | ||
|
||
- name: Push to dockerhub | ||
run: docker push threefolddev/staing-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.TF_KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config | ||
- name: deploy or upgrade new to kubernetes threefoldconnect-staging | ||
run: helm upgrade news helm_files --set image.tag=${{ github.sha }} -n threefoldconnect-staging |