Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Delyc committed Aug 23, 2024
1 parent 923086c commit a10ac46
Show file tree
Hide file tree
Showing 11 changed files with 22,372 additions and 13,430 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Push MPM Backend Image
on:
push:
branches:
- ft/deployment
- main

jobs:
build-and-push:
Expand All @@ -22,6 +22,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Determine Image Tag
id: docker-meta
run: |
echo "TAG=$("latest")-${{ github.sha }}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build and Push MPM Frontend Image
name: Build, Push, and Release

on:
push:
branches:
- ft/deployment
- ft/versioning

jobs:
build-and-push:
Expand All @@ -30,3 +30,24 @@ jobs:
platforms: linux/amd64
push: true
tags: enaccess/mpm-frontend:latest

release:
needs: build-and-push
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
37 changes: 37 additions & 0 deletions .github/workflows/deploy-eks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to Kubernetes

on:
workflow_dispatch:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Update Kubernetes Manifests
run: |
IMAGE_NAME=enaccess/mpm-backend
TAG=
sed -i "s|image: .*|image: $IMAGE_NAME:$TAG|" ./k8s/deployments/mpm-backend.yaml
- name: Apply Kubernetes Configuration
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
kubectl apply -f ./k8s/deployments/mpm-backend.yaml
kubectl apply -f ./k8s/services/mpm-backend.yaml
# add kube secrets to github repo
# tags: use latest or have a version number
13 changes: 13 additions & 0 deletions Website/ui/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branches": ["ft/versioning"],
"repositoryUrl": "https://github.com/EnAccess/micropowermanager",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/git",
"@semantic-release/npm"
],
"tagFormat": "v${version}"
}
Loading

0 comments on commit a10ac46

Please sign in to comment.