From 4d60601db03fd2a145a4a4d18ad30fe1267c1394 Mon Sep 17 00:00:00 2001 From: Vicente Herrera Date: Sat, 31 Oct 2020 01:00:32 +0100 Subject: [PATCH] Labels for automatic push without prefix letter v --- .github/workflows/build.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 052fa9b..e687888 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -209,15 +209,18 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT_PKG }} - - name: Prepare version major - id: prepare_version_major + - name: Prepare version labels + id: prepare_version_labels env: - VERSION_FULL: ${{ github.event.release.tag_name }} + VERSION_TAG: ${{ github.event.release.tag_name }} run: | - echo "Version full: $VERSION_FULL" - VERSION_MAJOR=$(echo $VERSION_FULL | sed 's/[^0-9]*\([0-9]\+\).*/\1/') + echo "Version tag: $VERSION_TAG" + VERSION_MAJOR=$(echo $VERSION_TAG | sed 's/[^0-9]*\([0-9]\+\).*/\1/') + VERSION_FULL=$(echo $VERSION_TAG | sed 's/[^0-9]*\([0-9]\+.*\)/\1/') echo "Version major: $VERSION_MAJOR" + echo "Version full: $VERSION_FULL" echo "::set-output name=VERSION_MAJOR::$VERSION_MAJOR" + echo "::set-output name=VERSION_FULL::$VERSION_FULL" - name: Build and push - Installer uses: docker/build-push-action@v2 with: @@ -227,8 +230,8 @@ jobs: push: true tags: | sysdiglabs/aks-audit-log-installer:latest - sysdiglabs/aks-audit-log-installer:${{ github.event.release.tag_name }} - sysdiglabs/aks-audit-log-installer:${{ steps.prepare_version_major.outputs.VERSION_MAJOR }} + sysdiglabs/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_MAJOR }} + sysdiglabs/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_FULL }} - name: Build and push - Forwarder uses: docker/build-push-action@v2 with: @@ -238,5 +241,5 @@ jobs: push: true tags: | sysdiglabs/aks-audit-log-forwarder:latest - sysdiglabs/aks-audit-log-forwarder:${{ github.event.release.tag_name }} - sysdiglabs/aks-audit-log-forwarder:${{ steps.prepare_version_major.outputs.VERSION_MAJOR }} + sysdiglabs/aks-audit-log-forwarder:${{ steps.prepare_version_labels.outputs.VERSION_MAJOR }} + sysdiglabs/aks-audit-log-forwarder:${{ steps.prepare_version_labels.outputs.VERSION_FULL }}