diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abcca7252..92bd15790 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,11 +27,6 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} metadata-file-path: '.github/project.yml' - - name: Set Image Tag Env - run: | - echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - echo "CURRENT_VERSION=$(echo ${{steps.metadata.outputs.current-version}} | tr '[:upper:]' '[:lower:]' )" >> $GITHUB_ENV - - name: Setup JDK uses: actions/setup-java@v4 with: @@ -58,7 +53,6 @@ jobs: export QUARKUS_CONTAINER_IMAGE_PASSWORD="${{ secrets.IMAGE_REPO_PASSWORD }}" export QUARKUS_CONTAINER_IMAGE_PUSH="true" export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=latest - export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.PROJECT_VERSION }}" export GIT_REVISION=$(git rev-parse --short release) # Build and push the release images using the commit tagged in `release:prepare` mvn -B -P container-image release:perform --no-transfer-progress '-Drelease.arguments=-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64' @@ -82,7 +76,7 @@ jobs: push: true file: target/checkout/operator/target/bundle/console-operator/bundle.Dockerfile tags: | - ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:${{ env.CURRENT_VERSION }} + ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:${{steps.metadata.outputs.current-version}} ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:latest - name: Build Operator Catalog @@ -92,7 +86,8 @@ jobs: chmod +x opm sudo cp -v opm /usr/bin/ rm -vf opm - operator/bin/generate-catalog.sh ${{ env.PROJECT_VERSION }} + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]') + operator/bin/generate-catalog.sh ${VERSION} - name: Build and Push Operator Catalog Image uses: docker/build-push-action@v6 @@ -103,7 +98,7 @@ jobs: push: true file: target/checkout/operator/target/catalog.Dockerfile tags: | - ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:${{ env.CURRENT_VERSION }} + ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:${{steps.metadata.outputs.current-version}} ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:latest - name: Build UI @@ -125,7 +120,7 @@ jobs: provenance: false push: true tags: | - ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{ env.CURRENT_VERSION }} + ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{steps.metadata.outputs.current-version}} ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:latest - name: Push Release Tag diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 6f640aeb1..e7db0b79e 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -24,9 +24,7 @@ jobs: local-file: 'true' - name: Set Image Tag Env - run: | - echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - echo "NEXT_VERSION=$(echo ${{steps.metadata.outputs.next-version}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + run: echo "NEXT_VERSION=$(echo ${{steps.metadata.outputs.next-version}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - name: Setup JDK uses: actions/setup-java@v4 @@ -55,7 +53,7 @@ jobs: export QUARKUS_CONTAINER_IMAGE_USERNAME="${{ secrets.IMAGE_REPO_USERNAME }}" export QUARKUS_CONTAINER_IMAGE_PASSWORD="${{ secrets.IMAGE_REPO_PASSWORD }}" export QUARKUS_CONTAINER_IMAGE_PUSH="true" - export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.PROJECT_VERSION }}" + export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.NEXT_VERSION }}" export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=snapshot-${{github.ref_name}} export GIT_REVISION=$(git rev-parse --short HEAD) # Build and push the snapshot images @@ -89,7 +87,7 @@ jobs: chmod +x opm sudo cp -v opm /usr/bin/ rm -vf opm - operator/bin/generate-catalog.sh ${{ env.PROJECT_VERSION }} + operator/bin/generate-catalog.sh ${{ env.NEXT_VERSION }} - name: Build and Push Operator Catalog Image uses: docker/build-push-action@v6