Skip to content

another deployment test #16

another deployment test

another deployment test #16

Workflow file for this run

name: dtt-dev
on:
push:
branches:
- "main"
- "DTT-*"
env:
DEV_TAG: idlaborg/dtt-docs:dev-${{ github.run_id }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Login
run: |
docker login \
-u ${{ secrets.DOCKERHUB_USERNAME }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Build
run: |
docker build . --tag ${{ env.DEV_TAG }}
- name: Docker Push
run: |
docker push ${{ env.DEV_TAG }}
deploy:
needs: [build]
runs-on: self-hosted
steps:
- uses: chrnorm/deployment-action@v2
name: Create GitHub deployment
id: deployment
with:
token: '${{ github.token }}'
environment: development
- name: Update deployment status
uses: chrnorm/deployment-status@v2
if: always()
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: ${{ job.status }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
- name: Checkout
uses: actions/checkout@v3
- name: Create kube config
run: |
mkdir -p $HOME/.kube/
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Install helm
run: |
curl -LO https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz
tar -zxvf helm-v3.8.0-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
helm version
- name: Lint helm charts
run: helm lint ./charts/
- name: Deploy
run: |
helm upgrade --install \
dtt-docs ./charts/ -f ./charts/values.yaml \
--namespace dtt-app --create-namespace \
--set deployment.image.tag=dev-${{ github.run_id }}
- name: Update deployment status
uses: chrnorm/deployment-status@v2
if: always()
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: ${{ job.status }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}