Skip to content

Commit

Permalink
updated script called in cd
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Sep 13, 2024
1 parent 666e5fc commit a4d0bcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ jobs:
# Run the deploy script for each service
- name: Deploy api microservice container to GHCR
run: |
./assets/scripts/push_image.sh compose_api ${{ env.API_VERSION }} ${{ secrets.REPO_ADMIN_GH_USERNAME }}
./assets/scripts/push_image.sh compose_api ${{ env.API_VERSION }}
env:
REPO_ADMIN_GH_USERNAME: ${{ secrets.REPO_ADMIN_GH_USERNAME }}
REPO_ADMIN_GHCR_TOKEN: ${{ secrets.REPO_ADMIN_GHCR_TOKEN }}

# Run the deploy script for each service
- name: Deploy worker microservice container to GHCR
run: |
./assets/scripts/push_image.sh compose_worker ${{ env.WORKER_VERSION }} ${{ secrets.REPO_ADMIN_GH_USERNAME }}
./assets/scripts/push_image.sh compose_worker ${{ env.WORKER_VERSION }}
env:
REPO_ADMIN_GH_USERNAME: ${{ secrets.REPO_ADMIN_GH_USERNAME }}
REPO_ADMIN_GHCR_TOKEN: ${{ secrets.REPO_ADMIN_GHCR_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions assets/scripts/push_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ set -e

lib="$1"
version="$2"
# gh_username="$3"
gh_username="$3"

if [ "$version" == "" ]; then
echo "You must pass a version as second arg."
exit 1
fi

# login to github
# ./assets/scripts/gh_login.sh "$gh_username"
if [ "$gh_username" != "" ]; then
./assets/scripts/gh_login.sh "$gh_username"
fi

# yes | docker system prune

Expand Down

0 comments on commit a4d0bcd

Please sign in to comment.