From 82f4f02b3223f0ce92cac93b79ff719522aac2bc Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Tue, 16 Apr 2024 12:26:39 -0700 Subject: [PATCH] test Signed-off-by: Vince Prignano --- .github/workflows/tools-releases.yml | 45 ++++++++-------------------- hack/envtest/_matrix/v1.29.3.yaml | 1 + 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/.github/workflows/tools-releases.yml b/.github/workflows/tools-releases.yml index 8d0875e8f..18f475774 100644 --- a/.github/workflows/tools-releases.yml +++ b/.github/workflows/tools-releases.yml @@ -4,12 +4,12 @@ on: push: branches: - main + - tools-releases paths: - 'hack/envtest/_matrix/*.yaml' permissions: - contents: read - packages: write + contents: write jobs: build-and-push: @@ -45,35 +45,14 @@ jobs: echo "One Kubernetes patch version files should be changed to create a package, found ${{ steps.changed-files.outputs.all_changed_files_count }}" exit 1 fi - for changed_file in ${{ steps.changed-files.outputs.all_changed_files }}; do - export KUBERNETES_VERSION=$(echo "${changed_file}" | grep -oP '(?<=/)[^/]+(?=\.yaml)') - echo "KUBERNETES_VERSION=$KUBERNETES_VERSION" >> $GITHUB_ENV - - GO_VERSION=$(yq eval '.go' $changed_file) - echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV - - ETCD_VERSION=$(yq eval '.etcd' $changed_file) - echo "ETCD_VERSION=$ETCD_VERSION" >> $GITHUB_ENV - done - - name: Set up Docker - uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # tag=v3.2.0 - - name: Log in to the Container registry - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # tag=v3.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker images - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # tag=v5.3.0 + - name: Build packages + run: hack/envtest/build.sh + - name: Release + uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # tag=v2.0.4 with: - context: . - file: ./hack/envtest/${{matrix.os}}/Dockerfile - build-args: | - GO_VERSION=${{env.GO_VERSION}} - KUBERNETES_VERSION=${{env.KUBERNETES_VERSION}} - ETCD_VERSION=${{env.ETCD_VERSION}} - OS=${{matrix.os}} - ARCH=${{matrix.arch}} - push: true - tags: | - ghcr.io/kubernetes-sigs/controller-tools/envtest:${{env.KUBERNETES_VERSION}}-${{matrix.os}}-${{matrix.arch}} + name: envtest/${{ env.KUBERNETES_VERSION }} + draft: true + prerelease: true + make_latest: false + files: out/* + fail_on_unmatched_files: true diff --git a/hack/envtest/_matrix/v1.29.3.yaml b/hack/envtest/_matrix/v1.29.3.yaml index d35406399..1090968d7 100644 --- a/hack/envtest/_matrix/v1.29.3.yaml +++ b/hack/envtest/_matrix/v1.29.3.yaml @@ -1,2 +1,3 @@ go: 1.21 etcd: v3.5.12 +