Skip to content

Commit

Permalink
Add release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
fredimachado committed Sep 20, 2023
1 parent cf7311c commit 41405a3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/admin-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,40 @@ jobs:
chmod +x $GITHUB_WORKSPACE/scripts/generate-artifacts
$GITHUB_WORKSPACE/scripts/generate-artifacts -a appspec.yaml -i ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} -t ${{ steps.meta.outputs.version }} -r $GITHUB_WORKSPACE/helm
- name: Archive publish artifacts
- name: Archive release artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: src/Admin/NCafe.Admin.Api/deploy/

release:
runs-on: self-hosted
needs: build

env:
ENVIRONMENT: dev

steps:

- uses: actions/checkout@v3

- name: Download release artifacts
uses: actions/download-artifact@v3
with:
name: release-artifacts
path: src/Admin/NCafe.Admin.Api/deploy/

- uses: jkroepke/setup-helmfile@v1
with:
version: '0.156.0'

- name: Deploy to Kubernetes
run: |
sed -i "s/[$]namespace[$]/${{ env.ENVIRONMENT }}/g" deploy/helmfile.yaml
echo -e "\e[92mConfiguring kubernetes access in pipeline...\e[0m"
mkdir .kube
echo ${{ secrets.KUBE_CONFIG }} | base64 -d > .kube/config
export KUBECONFIG=.kube/config
echo -e "\e[92mDeploying to ${{ env.ENVIRONMENT }} environment...\e[0m"
cd deploy
helmfile --color -e ${{ env.ENVIRONMENT }} apply --set image.imagePullPolicy=Always
6 changes: 6 additions & 0 deletions NCafe.sln
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{F28F0BC8-4EA1-
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NCafe.Web", "src\UI\NCafe.Web\NCafe.Web.csproj", "{25EC5820-391C-43AB-A750-D73346C30897}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{A86CCFC2-A4C3-489D-8F9E-1E182DF1B4AF}"
ProjectSection(SolutionItems) = preProject
scripts\generate-artifacts = scripts\generate-artifacts
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -126,6 +131,7 @@ Global
{13022A59-EDA3-409C-AB1E-0C74BF557DBC} = {A650B4F4-E754-46C8-B48C-1C1277078D1E}
{23A26860-042D-4E27-8D3D-FDAFEF231C42} = {2694AE6D-E1BB-49F4-B8F6-D023610909BC}
{25EC5820-391C-43AB-A750-D73346C30897} = {F28F0BC8-4EA1-4980-B721-ED47D569343B}
{A86CCFC2-A4C3-489D-8F9E-1E182DF1B4AF} = {38B2A41D-2CD0-48A4-8B0E-8380E6C20FAB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F0136BF1-D5F3-4E83-8D23-E3F43534FBB5}
Expand Down

0 comments on commit 41405a3

Please sign in to comment.