diff options
| author | gy95 <guoyao17@huawei.com> | 2022-06-20 11:45:50 +0800 |
|---|---|---|
| committer | gy95 <guoyao17@huawei.com> | 2022-06-22 17:48:13 +0800 |
| commit | 903f11b335e5d0fc2f19869e642de4522e0fb894 (patch) | |
| tree | a9aa6e247aaa491ec8b1660736b05cb95a8f777e | |
| parent | Merge pull request #3950 from wackxu/removeperformance (diff) | |
| download | kubeedge-903f11b335e5d0fc2f19869e642de4522e0fb894.tar.gz | |
add release ci
Signed-off-by: gy95 <guoyao17@huawei.com>
| -rw-r--r-- | .github/workflows/release.yml | 84 | ||||
| -rwxr-xr-x | hack/make-rules/crossbuildimage.sh | 2 |
2 files changed, 85 insertions, 1 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..442345cf1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +name: build release, release image to DockerHub +on: + release: + types: + - published +env: + CONTAINER_RUN_OPTIONS: " " + +jobs: + release-assests: + name: release kubeedge components + runs-on: ubuntu-18.04 + strategy: + matrix: + target: + - kubeedge + - edgesite + - keadm + os: + - linux + arch: + - amd64 + - arm64 + - arm + ARM_VERSION: + - GOARM7 + - GOARM8 + - "" + steps: + - name: checkout code + uses: actions/checkout@v2 + with: + # fetch-depth: + # 0 indicates all history for all branches and tags. + # for `git describe --tags` in Makefile. + fetch-depth: 0 + - name: Making and packaging + run: | + docker pull kubeedge/build-tools + make release ARM_VERSION=${{ matrix.ARM_VERSION }} + - name: Uploading assets... + if: ${{ !env.ACT }} + uses: softprops/action-gh-release@v1 + with: + files: | + _output/release/${{ github.ref_name }}/${{ matrix.target }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz + _output/release/${{ github.ref_name }}/checksum_${{ matrix.target }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz.txt + + publish-image-to-dockerhub: + name: publish to DockerHub + strategy: + matrix: + target: + - cloudcore + - admission + #- edgecore + - edgesite-agent + - edgesite-server + - csidriver + - iptablesmanager + - edgemark + - installation-package + runs-on: ubuntu-18.04 + steps: + - name: checkout code + uses: actions/checkout@v2 + with: + # fetch-depth: + # 0 indicates all history for all branches and tags. + # for `git describe --tags` in Makefile. + fetch-depth: 0 + - name: install QEMU + uses: docker/setup-qemu-action@v1 + - name: install Buildx + uses: docker/setup-buildx-action@v1 + - name: login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER_NAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build and publish images + env: + IMAGE_REPO_NAME: kubeedge + run: make crossbuildimage WHAT=${{ matrix.target }} diff --git a/hack/make-rules/crossbuildimage.sh b/hack/make-rules/crossbuildimage.sh index 7e908d9b7..e14d82ac9 100755 --- a/hack/make-rules/crossbuildimage.sh +++ b/hack/make-rules/crossbuildimage.sh @@ -23,7 +23,7 @@ set -o pipefail KUBEEDGE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)" IMAGE_TAG=$(git describe --tags) GO_LDFLAGS="$(${KUBEEDGE_ROOT}/hack/make-rules/version.sh)" -IMAGE_REPO_NAME="kubeedge" +IMAGE_REPO_NAME="${IMAGE_REPO_NAME:-kubeedge}" ALL_IMAGES_AND_TARGETS=( #{target}:{IMAGE_NAME}:{DOCKERFILE_PATH} |
