Skip to content

Commit

Permalink
chore(cicd): fix how to find base image projects
Browse files Browse the repository at this point in the history
  • Loading branch information
henrylee97 committed Nov 30, 2023
1 parent 57e536d commit 8a15e96
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ jobs:
- name: Check if base image exists
id: check-if-base-image-exists
run: |
lang=$(echo ${{ matrix.target }} | cut -d '/' -f 1)
proj=$(echo ${{ matrix.target }} | cut -d '/' -f 2 | cut -d '-' -f 1)
ls ${lang}-base/${proj}
lang=$(echo ${{ matrix.target }} | cut -d'/' -f1)
proj=$(echo ${{ matrix.target }} | cut -d'/' -f2 | rev | cut-d'-' -f2- | rev)
if [ -d ${lang}-base/${proj} ]; then
echo "base=${lang}-base/${proj}" >> ${GITHUB_OUTPUT}
echo "image=${lang}-base:${proj}" | tr '[:upper:]' '[:lower:]' >> ${GITHUB_OUTPUT}
Expand Down

0 comments on commit 8a15e96

Please sign in to comment.