Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <vincepri@redhat.com>
  • Loading branch information
vincepri committed Apr 16, 2024
1 parent 4cff6b5 commit 82f4f02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
45 changes: 12 additions & 33 deletions .github/workflows/tools-releases.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions hack/envtest/_matrix/v1.29.3.yaml
@@ -1,2 +1,3 @@
go: 1.21
etcd: v3.5.12

0 comments on commit 82f4f02

Please sign in to comment.