diff --git a/.github/workflows/build-container-image.yml b/.github/workflows/build-container-image.yml index 7acd9861..d6ea5daf 100644 --- a/.github/workflows/build-container-image.yml +++ b/.github/workflows/build-container-image.yml @@ -5,9 +5,9 @@ on: inputs: versionTag: description: "Version tag of the image" - default: "" + default: "latest" type: string - required: false + required: true push: branches: - main @@ -27,22 +27,12 @@ jobs: with: go-version: "1.18" - - name: Pseudo version - id: pseudo-version - run: | - git clone https://github.com/edgelesssys/constellation /constellation - cd /constellation/hack/pseudo-version - echo "pseudoVersion=$(go run .)" >> $GITHUB_ENV - echo ${{ env.pseudoVersion }} - - name: Set up Docker Buildx id: docker-setup uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 - name: Build container image - run: make GCE_PD_CSI_STAGING_IMAGE=ghcr.io/edgelesssys/constellation/gcp-csi-driver \ - GCE_PD_CSI_STAGING_VERSION=${{ env.pseudoVersion }} \ - make push-container + run: GCE_PD_CSI_STAGING_IMAGE=ghcr.io/edgelesssys/constellation/gcp-csi-driver GCE_PD_CSI_STAGING_VERSION=${{ inputs.versionTag }} make build-container - name: Log in to the Container registry id: docker-login @@ -53,10 +43,4 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push container image - run: | - docker push ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ env.pseudoVersion }} - if [ "${{ inputs.versionTag }}" != "" ] - then - docker tag ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ env.pseudoVersion }} ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ inputs.versionTag }} - docker push ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ inputs.versionTag }} - fi + run: docker push ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ inputs.versionTag }}