From 2b0d9f2e687af8d2ff1cd896d5abef7bfe178b22 Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Mon, 25 Jul 2022 18:13:38 +0200 Subject: [PATCH] [bitnami/*] Fix wrong tag in CD pipeline (#656) * Merge commits has the number of the PR at the end Signed-off-by: Fran Mulero * Remove unnecesary filter Signed-off-by: Fran Mulero --- .github/workflows/cd-pipeline.yaml | 5 ++--- .github/workflows/ci-pipeline.yaml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-pipeline.yaml b/.github/workflows/cd-pipeline.yaml index 32f815165b53..bdbca0e02248 100644 --- a/.github/workflows/cd-pipeline.yaml +++ b/.github/workflows/cd-pipeline.yaml @@ -84,15 +84,14 @@ jobs: name: Get image tag and container name run: | # Now EAM commits has the following format "[bitnami/] Release " - tag="$(git log --pretty=tformat:"%s" -n 1 --grep="[R|r]elease" --author bitnami-bot@vmware.com --author containers@bitnami.com --author containers-bot@bitnami.com -- ${{ matrix.container }} | sed "s|\[.*\]||" | sed "s|[R|r]elease||" | sed "s|[[:space:]]*||")" + tag="$(git log --pretty=tformat:"%s" -n 1 --grep="[R|r]elease" --author bitnami-bot@vmware.com --author containers@bitnami.com --author containers-bot@bitnami.com -- ${{ matrix.container }} | sed "s|\[.*\]||" | sed "s|[R|r]elease||" | awk '{print $1}')" if [[ -z "${tag}" ]]; then - echo "No tag found for: ${{ needs.get-container.outputs.path }}" + echo "No tag found for: ${{ matrix.container }}" exit 1 else name="$(echo "${{ matrix.container }}" | awk -F '/' '{print $2}')" echo "::set-output name=tag::${tag}" echo "::set-output name=name::${name}" - echo "::set-output name=tag::${tag}" fi - uses: vmware-labs/vmware-image-builder-action@main name: "Publish ${{ steps.get-container-metadata.outputs.name }}: ${{ steps.get-container-metadata.outputs.tag }}" diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 35c000a14e1f..07fc3db634ae 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -96,7 +96,7 @@ jobs: name: Get latest image tag run: | # Now EAM commits has the following format "[bitnami/] Release " - tag="$(git log --pretty=tformat:"%s" -n 1 --grep="[R|r]elease" --author bitnami-bot@vmware.com --author containers@bitnami.com --author containers-bot@bitnami.com -- ${{ needs.get-container.outputs.path }} | sed "s|\[.*\]||" | sed "s|[R|r]elease||" | sed "s|[[:space:]]*||")" + tag="$(git log --pretty=tformat:"%s" -n 1 --grep="[R|r]elease" --author bitnami-bot@vmware.com --author containers@bitnami.com --author containers-bot@bitnami.com -- ${{ needs.get-container.outputs.path }} | sed "s|\[.*\]||" | sed "s|[R|r]elease||" | awk '{print $1}')" if [[ -z "${tag}" ]]; then echo "No tag found for: ${{ needs.get-container.outputs.path }}" exit 1