From 168c86237af256e80a9e042da672172367d463e1 Mon Sep 17 00:00:00 2001 From: Seokhyun Lee <7948302+henrylee97@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:49:14 +0900 Subject: [PATCH] chore(cicd): make sure all image name and tags are in lower case (#106) --- .github/workflows/build.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c77090cd8..ee7aee816 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,8 +49,8 @@ jobs: - name: Make build info id: make-build-info run: | - echo "language=$(echo ${{ matrix.target }} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} - echo "project=$(echo ${{ matrix.target }} | cut -d '/' -f 2 )" >> ${GITHUB_OUTPUT} + echo "language=$(echo ${{ matrix.target }} | cut -d'/' -f1 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} + echo "project=$(echo ${{ matrix.target }} | cut -d'/' -f2 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 @@ -116,15 +116,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Read metadata - id: read-metadata + - name: Make build info + id: make-build-info run: | - content=$(cat ${{ matrix.target }}/metadata.json) - content="${content//$'\n'/''}" - echo "language=$(echo $content | jq -r .language)" >> ${GITHUB_OUTPUT} - echo "id=$(echo $content | jq -r .id)" >> ${GITHUB_OUTPUT} - - run: | - echo "${{steps.read-metadata.outputs.metadata}}" + echo "language=$(echo ${{ matrix.target }} | cut -d'/' -f1 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} + echo "benchmark=$(echo ${{ matrix.target }} | cut -d'/' -f2 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: @@ -137,6 +133,6 @@ jobs: file: ${{ matrix.target }}/Dockerfile platforms: linux/amd64 push: true - tags: ${{ env.REGISTRY }}/kupl/starlab-benchmarks/${{ steps.read-metadata.outputs.language }}:${{ steps.read-metadata.outputs.id }} + tags: ${{ env.REGISTRY }}/kupl/starlab-benchmarks/${{ steps.make-build-info.outputs.language }}:${{ steps.make-build-info.outputs.benchmark }} labels: | org.opencontainers.image.source="https://github.com/kupl/starlab-benchmarks"