Skip to content

Commit

Permalink
fix(infra): fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Sep 30, 2023
1 parent 55bfd4c commit 8f936af
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,7 +49,7 @@ jobs:
with:
name: production-artifacts
path: |
backend/build/
backend/
frontend/public
build-docker:
needs: build
Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,7 +49,7 @@ jobs:
with:
name: production-artifacts
path: |
backend/build/
backend/
frontend/public
build-docker:
needs: build
Expand Down Expand Up @@ -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 }}

0 comments on commit 8f936af

Please sign in to comment.