Skip to content

DockerImage

DockerImage #175

Workflow file for this run

# Tencent is pleased to support the open source community by making Polaris available.
#
# Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# 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.
name: DockerImage
on:
release:
types: [ published ]
jobs:
release:
name: Release Polaris Docker Image
runs-on: ubuntu-latest
strategy:
matrix:
goos: [ linux ]
goarch: [ amd64 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.5"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
config-inline: |
insecure-entitlements = [ "network.host" ]
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.POLARIS_DOCKER_NAME }}
password: ${{ secrets.POLARIS_DOCKER_PASSWORD }}
- name: Build Server
id: build-server
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
DOCKER_TAG: ${{ steps.get_version.outputs.VERSION }}
run: |
ls -lstrh
make build-docker IMAGE_TAG=${DOCKER_TAG}
- name: Build Prometheus
id: build-prom
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
DOCKER_TAG: ${{ steps.get_version.outputs.VERSION }}
run: |
cd release/standalone/docker/prometheus
ls -lstrh
bash build_docker_prom.sh ${DOCKER_TAG}