Skip to content

Commit

Permalink
Merge pull request #34 from tribofustack/update-image
Browse files Browse the repository at this point in the history
Update image
  • Loading branch information
PeeQuessada authored Mar 19, 2024
2 parents 0734893 + e14458c commit 654f3fe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/apply.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Apply

on: [push, workflow_dispatch]
on:
push:
branches: [main]
workflow_dispatch:

jobs:
apply:
Expand Down Expand Up @@ -40,8 +43,8 @@ jobs:
env:
GOOGLE_CREDENTIALS: ${{ secrets.CREDENTIALS }}
run: |
docker build -t ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/${{ vars.PREFIX }}-${{vars.PROJECT_ID}}/app:${{ github.run_id }} .
docker push ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/${{ vars.PREFIX }}-${{vars.PROJECT_ID}}/app:${{ github.run_id }}
docker build -t ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/repository/app:${{ github.run_id }} .
docker push ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/repository/app:${{ github.run_id }}
- name: Setup Namespace
run: kubectl config set-context --current --namespace=orderly
Expand All @@ -58,7 +61,7 @@ jobs:

- name: apply api
env:
IMAGE_NAME: ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/${{ vars.PREFIX }}-${{vars.PROJECT_ID}}/app:${{ github.run_id }}
IMAGE_NAME: ${{ vars.REGION }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/repository/app:${{ github.run_id }}
run: |
echo "$(cat api-deployment.yaml)" | envsubst | kubectl apply -f -
kubectl apply -f k8s/api-hpa.yaml
Expand Down

0 comments on commit 654f3fe

Please sign in to comment.