Skip to content

Commit

Permalink
ci: improved github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
demartis committed Nov 15, 2023
1 parent 7b4291a commit e7f9b1f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/sub_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
-
name: Image Simple Test
name: Image simple test
run: |
docker run --rm ${{ inputs.DOCKERHUB_REPO }}:${{ env.TEST_TAG }}
-
name: Image MCR Version Check Test
name: Image MCR version check Test
run: |
docker run --rm ${{ inputs.DOCKERHUB_REPO }}:${{ env.TEST_TAG }} cat $MCR_MASTER_PATH/VersionInfo.xml
docker run -v `pwd`/../test:/test --rm ${{ inputs.DOCKERHUB_REPO }}:${{ env.TEST_TAG }} bash /test/mcr_version.sh ${{ DOCKERHUB_TAG }}
-
name: Build and push (cached) :${{ inputs.DOCKERHUB_TAG }} ${{ inputs.is_latest == true && 'and :latest' || '' }} ${{ inputs.is_latest_meshlab == true && 'and :latest-meshlab' || '' }}
Expand All @@ -114,9 +114,9 @@ jobs:
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache

-
name: MCR Version check
name: MCR version heck
run: |
docker run --rm ${{ inputs.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} cat $MCR_MASTER_PATH/VersionInfo.xml
docker run -v `pwd`/../test:/test --rm ${{ inputs.DOCKERHUB_REPO }}:${{ env.TEST_TAG }} bash /test/mcr_version.sh ${{ DOCKERHUB_TAG }}
-
name: MCR Test (Temp skipped)
continue-on-error: true
Expand Down
21 changes: 21 additions & 0 deletions test/mcr_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2023. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
# Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
# Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
# Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
# Vestibulum commodo. Ut rhoncus gravida arcu.
#

cat $MCR_MASTER_PATH/VersionInfo.xml

XMLTAG=release
result=`sed -n "/$XMLTAG/{s/.*<$XMLTAG>//;s/<\/$XMLTAG.*//;p;}" $MCR_MASTER_PATH/VersionInfo.xml`

echo "Checking MCR version. It must be $1"
if [[ "$result" == "$1" ]]; then
echo "OK"
else
echo -e '\033[31m' "Error. Version found: $result" '\033[0m'
exit 1
fi

0 comments on commit e7f9b1f

Please sign in to comment.