-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Björn Urban
committed
Sep 30, 2023
1 parent
55bfd4c
commit 8f936af
Showing
2 changed files
with
29 additions
and
29 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
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 |
---|---|---|
|
@@ -36,10 +36,9 @@ jobs: | |
- name: Build | ||
working-directory: frontend | ||
run: npm run build | ||
- name: Copy Frontend distributable | ||
run: cp -r frontend/dist src/main/resources | ||
- name: Install dependencies | ||
run: go get . | ||
working-directory: backend | ||
run: go get ./... | ||
- name: Build | ||
working-directory: backend | ||
run: go build -o build/kubevoyage ./cmd/kubevoyage | ||
|
@@ -50,7 +49,7 @@ jobs: | |
with: | ||
name: production-artifacts | ||
path: | | ||
backend/build/ | ||
backend/ | ||
frontend/public | ||
build-docker: | ||
needs: build | ||
|
@@ -79,28 +78,30 @@ jobs: | |
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kubevoyage:${{ env.BRANCH_NAME }} | ||
|
||
pulumi-deploy: | ||
needs: build-docker | ||
release: | ||
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | ||
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- run: npm install | ||
working-directory: deploy | ||
- name: Decode kubeconfig | ||
run: | | ||
mkdir -p $HOME/.kube | ||
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config | ||
cat $HOME/.kube/config | ||
shell: bash | ||
- name: Deploy with Pulumi | ||
uses: pulumi/actions@v4 | ||
with: | ||
command: up | ||
stack-name: dev | ||
work-dir: deploy | ||
env: | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
registryImage: ${{ secrets.DOCKERHUB_USERNAME }}/kubevoyage | ||
imageTag: ${{ github.head_ref || github.ref_name }} | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
registryImage: ${{ secrets.DOCKERHUB_USERNAME }}/kubevoyage | ||
imageTag: ${{ github.head_ref || github.ref_name }} | ||
CR_TOKEN: ${{ secrets.PAT }} |