github.com/polarismesh/polaris@v1.17.8/.github/workflows/docker.yml (about) 1 # Tencent is pleased to support the open source community by making Polaris available. 2 # 3 # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 # 5 # Licensed under the BSD 3-Clause License (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # https://opensource.org/licenses/BSD-3-Clause 10 # 11 # Unless required by applicable law or agreed to in writing, software distributed 12 # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 13 # CONDITIONS OF ANY KIND, either express or implied. See the License for the 14 # specific language governing permissions and limitations under the License. 15 16 name: DockerImage 17 18 on: 19 release: 20 types: [ published ] 21 22 jobs: 23 release: 24 name: Release Polaris Docker Image 25 runs-on: ubuntu-latest 26 strategy: 27 matrix: 28 goos: [ linux ] 29 goarch: [ amd64 ] 30 steps: 31 - name: Checkout code 32 uses: actions/checkout@v2 33 34 - name: Get version 35 id: get_version 36 run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} 37 38 - name: Setup Go 39 uses: actions/setup-go@v4 40 with: 41 go-version: "1.20" 42 43 - name: Set up Docker Buildx 44 uses: docker/setup-buildx-action@v1 45 with: 46 config-inline: | 47 insecure-entitlements = [ "network.host" ] 48 49 - name: Log in to Docker Hub 50 uses: docker/login-action@v1 51 with: 52 username: ${{ secrets.POLARIS_DOCKER_NAME }} 53 password: ${{ secrets.POLARIS_DOCKER_PASSWORD }} 54 55 - name: Build Server 56 id: build-server 57 env: 58 GOOS: ${{ matrix.goos }} 59 GOARCH: ${{ matrix.goarch }} 60 DOCKER_TAG: ${{ steps.get_version.outputs.VERSION }} 61 run: | 62 ls -lstrh 63 make build-docker IMAGE_TAG=${DOCKER_TAG} 64 65 - name: Build Prometheus 66 id: build-prom 67 env: 68 GOOS: ${{ matrix.goos }} 69 GOARCH: ${{ matrix.goarch }} 70 DOCKER_TAG: ${{ steps.get_version.outputs.VERSION }} 71 run: | 72 cd release/standalone/docker/prometheus 73 ls -lstrh 74 bash build_docker_prom.sh ${DOCKER_TAG}