Skip to content

Commit

Permalink
feat: add add labels (#107)
Browse files Browse the repository at this point in the history
* feat: add add labels

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* fix: add docker file set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* fix: add docker file set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* fix: add docker file set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* fix: add docker file set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* fix: add docker file set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* build: init projects

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* build: init projects

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* build: init projects

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

* feat: set github hub

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>

---------

Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
  • Loading branch information
cubxxw authored Aug 2, 2023
1 parent e71708f commit 891627a
Show file tree
Hide file tree
Showing 14 changed files with 458 additions and 209 deletions.
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "feat"
include: "scope"
groups:
gomod-deps:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "chore"
include: "scope"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "feat"
include: "scope"
6 changes: 5 additions & 1 deletion .github/workflows/auto-gh-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ on:
pull_request:
# types:
# - closed
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
create-pr:
runs-on: ubuntu-latest
if: github.event.pull_request.base.ref == 'main'
if: github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# 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.

name: Create Tag

on:
Expand All @@ -21,8 +35,8 @@ jobs:
VERSION=$(echo $COMMENT | cut -d ' ' -f 3)
TAG_COMMENT=$(echo $COMMENT | cut -d '"' -f 2)
if [[ $VERSION =~ ^v([0-9]+\.){2}[0-9]+$ ]]; then
echo "::set-output name=version::$VERSION"
echo "::set-output name=tag_comment::$TAG_COMMENT"
echo "version=$VERSION" >> $GITHUB_STATE
echo "tag_comment=$TAG_COMMENT" >> $GITHUB_STATE
else
echo "Invalid version number."
exit 1
Expand All @@ -32,7 +46,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: |
VERSION=${{ steps.validate.outputs.version }}
TAG_COMMENT=${{ steps.validate.outputs.tag_comment }}
git tag -a $VERSION -m "$TAG_COMMENT"
source $GITHUB_STATE
git tag -a $VERSION -m "$tag_comment"
git push origin $VERSION
echo "tag_created=$VERSION" >> $GITHUB_OUTPUT
26 changes: 22 additions & 4 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
GO_VERSION: "1.20"

jobs:
build:
build-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -64,11 +64,20 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-aliyun:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:latest
- name: Extract metadata (tags, labels) for Docker
id: meta2
Expand All @@ -87,11 +96,20 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}

build-ghcr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# ghcr.io/openimsdk/openim-chat:latest
- name: Extract metadata (tags, labels) for Docker
id: meta3
Expand All @@ -110,7 +128,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta3.outputs.tags }}
labels: ${{ steps.meta3.outputs.labels }}
85 changes: 0 additions & 85 deletions .github/workflows/buildx-images.yml

This file was deleted.

Loading

0 comments on commit 891627a

Please sign in to comment.