diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..8585da3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,6 @@ +**What this PR does / why we need it**: + +**Which issue(s) this PR fixes** *(optional, in `fixes #(, fixes #, ...)` format, will close the issue(s) when PR gets merged)*: +Fixes # + +**Special notes for your reviewer**: diff --git a/.github/workflows/docker_hipush.yml b/.github/workflows/docker_hipush.yml new file mode 100644 index 0000000..8765df9 --- /dev/null +++ b/.github/workflows/docker_hipush.yml @@ -0,0 +1,48 @@ +name: Hipush Docker Image + +on: + push: + branches: + - 'releases/**' + - 'main' + - 'master' + paths: + - 'api/**.go' + - 'cmd/**.go' + - 'config/**.go' + - 'internal/**.go' +jobs: + build_hipush: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 8 + + - uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: https://${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build And Push Docker Image + shell: bash + run: | + set -o xtrace + branch="${GITHUB_REF#refs/heads/}" + timestamp=`TZ="Asia/Shanghai" date +"%Y%m%d%H%M%S"` + export GO111MODULE=on + export VERSION="$branch-$timestamp-solo" + export GOOS=linux + export ARCH=all + export REGISTRY=${{ secrets.REGISTRY }}/cossim + make docker-build docker-push \ No newline at end of file