-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release.yml and push-images.sh to push mapper images to dockerhub…
… when release is published Signed-off-by: Ryan <[email protected]>
- Loading branch information
1 parent
1a172d8
commit ac64a52
Showing
8 changed files
with
122 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Build Mapper and Publish Docker Image to DockerHub | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push-docker-image-to-dockerhub: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Install dependences | ||
run: sudo apt-get update && sudo apt-get install -y upx-ucl gcc-aarch64-linux-gnu libc6-dev-arm64-cross gcc-arm-linux-gnueabi libc6-dev-armel-cross libva-dev libva-drm2 libx11-dev libvdpau-dev libxext-dev libsdl1.2-dev libxcb1-dev libxau-dev libxdmcp-dev yasm | ||
|
||
- name: Install ffmpeg | ||
run: sudo curl -sLO https://ffmpeg.org/releases/ffmpeg-4.1.6.tar.bz2 && tar -jx --strip-components=1 -f ffmpeg-4.1.6.tar.bz2 && ./configure && make && sudo make install | ||
|
||
- name: Install golangci-lint | ||
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.39.0 | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
env: | ||
IMAGE_REPO_NAME: kubeedge | ||
run: make all package ${{ github.ref_name }} | ||
|
||
- name: Push ble Mapper Image | ||
run: bash ./hack/make-rules/push-images.sh ble ${{ github.ref_name }} linux-amd64 ${{ env.IMAGE_REPO_NAME }} | ||
- name: Push modbus Mapper Image | ||
run: bash hack/make-rules/push-images.sh modbus ${{ github.ref_name }} linux-amd64 ${{ env.IMAGE_REPO_NAME }} | ||
- name: Push opcua Mapper Image | ||
run: bash hack/make-rules/push-images.sh opcua ${{ github.ref_name }} linux-amd64 ${{ env.IMAGE_REPO_NAME }} | ||
- name: Push onvif Mapper Image | ||
run: bash hack/make-rules/push-images.sh onvif ${{ github.ref_name }} linux-amd64 ${{ env.IMAGE_REPO_NAME }} | ||
- name: Push gige Mapper Image | ||
run: bash hack/make-rules/push-images.sh gige ${{ github.ref_name }} linux-amd64 ${{ env.IMAGE_REPO_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
### | ||
#Copyright 2021 The KubeEdge Authors. | ||
# | ||
#Licensed under the Apache License, Version 2.0 (the "License"); | ||
#you may not use this file except in compliance with the License. | ||
#You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
#Unless required by applicable law or agreed to in writing, software | ||
#distributed under the License is distributed on an "AS IS" BASIS, | ||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
#See the License for the specific language governing permissions and | ||
#limitations under the License. | ||
### | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# $1: name of mapper | ||
# $2: version of mapper | ||
# $3: architecture of mapper | ||
# $4: repository of dockerhub | ||
docker tag "$1-mapper:$2-$3" "$4/$1-mapper:$2-$3" | ||
docker push "$4/$1-mapper:$2-$3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters