Skip to content

Commit

Permalink
Maybe this works?
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-100 committed Jan 24, 2024
1 parent 8643dbd commit 68062e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/azure-kubernetes-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get Short Commit SHA
run: |
echo "Short Commit SHA: ${{ github.sha::7 }}"
echo "COMMIT_SHA_SHORT=${{ github.sha::7 }}" >> $GITHUB_ENV
- name: Azure login
uses: azure/login@v1.4.6
with:
Expand All @@ -36,17 +41,17 @@ jobs:
- name: Build docker images
run: |
echo "Building images"
docker build -t z100/soemi-woeb:0.0.4 ./soemi-woeb
docker build -t z100/soemi-woers:0.0.4 ./soemi-woers
docker build -t z100/soemi-woeb:${{ env.COMMIT_SHA_SHORT }}" ./soemi-woeb
docker build -t z100/soemi-woers:${{ env.COMMIT_SHA_SHORT }}" ./soemi-woers
- name: Push docker images
run: |
echo "Login to dockerhub"
docker login -u ${{ secrets.DOCKERHUB_U }} -p ${{ secrets.DOCKERHUB_T }}
echo "Pushing images"
docker push z100/soemi-woeb:0.0.4
docker push z100/soemi-woers:0.0.4
docker push z100/soemi-woeb:${{ env.COMMIT_SHA_SHORT }}"
docker push z100/soemi-woers:${{ env.COMMIT_SHA_SHORT }}"
deploy-services:
permissions:
Expand Down
5 changes: 4 additions & 1 deletion soemi-woeb/k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
spec:
containers:
- name: soemi-woeb
image: z100/soemi-woeb:0.0.4
image: z100/soemi-woeb
env:
- name: SHORT_COMMIT_SHA
value: "${{ env.COMMIT_SHA_SHORT }}"
ports:
- containerPort: 3000
5 changes: 4 additions & 1 deletion soemi-woers/k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ spec:
spec:
containers:
- name: soemi-woers
image: z100/soemi-woers:0.0.4
image: z100/soemi-woers
env:
- name: SHORT_COMMIT_SHA
value: "${{ env.COMMIT_SHA_SHORT }}"
ports:
- containerPort: 8089
livenessProbe:
Expand Down

0 comments on commit 68062e9

Please sign in to comment.