This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch podling
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/podling by this push:
new d80adbd4 ci(action): rename and refactor GitHub action
d80adbd4 is described below
commit d80adbd44e09e2040e2c9982dae6c8603793efa2
Author: LinkinStars <[email protected]>
AuthorDate: Wed Nov 8 15:29:39 2023 +0800
ci(action): rename and refactor GitHub action
---
...goreleaser.yml => build-binary-for-release.yml} | 4 +-
...ckerhub_img.yml => build-image-for-release.yml} | 6 +-
.../{manual_build.yml => build-image-for-test.yml} | 39 +++--------
.github/workflows/build_dev_img.yml | 79 ----------------------
.github/workflows/build_test.yml | 59 ----------------
.github/workflows/{ci.yml => check-asf-header.yml} | 0
6 files changed, 14 insertions(+), 173 deletions(-)
diff --git a/.github/workflows/build_goreleaser.yml
b/.github/workflows/build-binary-for-release.yml
similarity index 96%
rename from .github/workflows/build_goreleaser.yml
rename to .github/workflows/build-binary-for-release.yml
index a8d18142..ed22fe6a 100644
--- a/.github/workflows/build_goreleaser.yml
+++ b/.github/workflows/build-binary-for-release.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-name: "Goreleaser"
+name: Build Binary For Release
on:
push:
@@ -26,7 +26,7 @@ permissions:
jobs:
build-goreleaser:
- runs-on: [self-hosted, linux]
+ runs-on: ubuntu-latest
steps:
- name: Checkout
diff --git a/.github/workflows/build_dockerhub_img.yml
b/.github/workflows/build-image-for-release.yml
similarity index 95%
rename from .github/workflows/build_dockerhub_img.yml
rename to .github/workflows/build-image-for-release.yml
index c76bb617..cdb8c620 100644
--- a/.github/workflows/build_dockerhub_img.yml
+++ b/.github/workflows/build-image-for-release.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-name: Build DockerHub Image
+name: Build Docker Image For Release
on:
push:
@@ -29,7 +29,7 @@ on:
jobs:
build:
- runs-on: [self-hosted, linux]
+ runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -38,7 +38,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
- images: answerdev/answer
+ images: apache/answer
tags: |
type=raw,value=latest
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
diff --git a/.github/workflows/manual_build.yml
b/.github/workflows/build-image-for-test.yml
similarity index 68%
rename from .github/workflows/manual_build.yml
rename to .github/workflows/build-image-for-test.yml
index 01253404..1edb9c40 100644
--- a/.github/workflows/manual_build.yml
+++ b/.github/workflows/build-image-for-test.yml
@@ -15,33 +15,15 @@
# specific language governing permissions and limitations
# under the License.
-name: Manual Build DockerHub Image
+name: Build Docker Image For Test
on:
- workflow_dispatch:
- inputs:
- tag_name:
- type: string
- required: true
- description: 'DockerHub img tag name'
- logLevel:
- description: 'Log level'
- required: true
- default: 'warning'
- type: choice
- options:
- - info
- - warning
- - debug
- tags:
- description: 'Test scenario tags'
- required: false
- type: boolean
-
-
+ push:
+ branches: [ "test" ]
jobs:
build:
+ name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -51,10 +33,9 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
- images: answerdev/answer
+ images: apache/answer
tags: |
- type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
- type=semver,pattern={{version}}
+ type=raw,value=test
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@@ -72,10 +53,8 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
- platforms: linux/amd64,linux/arm64
- push: true
file: ./Dockerfile
- tags: answerdev/answer:${{ inputs.tag_name }}
+ platforms: linux/amd64
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
-
diff --git a/.github/workflows/build_dev_img.yml
b/.github/workflows/build_dev_img.yml
deleted file mode 100644
index 87145112..00000000
--- a/.github/workflows/build_dev_img.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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: Build Dev Image
-
-on:
- push:
- branches: [ "test","dev" ]
-
-
-jobs:
- build:
- name: Build and Push
- runs-on: [self-hosted,linux]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Docker meta
- id: meta
- uses: docker/metadata-action@v4
- with:
- images: ${{ secrets.IMG_URL }}/${{ secrets.IMG_NAMESPACE }}/answer
- tags: |
- type=raw,value=latest
-
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v2
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
-
- - name: Login to Container Registry
- uses: docker/login-action@v2
- with:
- registry: ${{ secrets.IMG_URL }}
- username: ${{ secrets.IMG_USERNAME }}
- password: ${{ secrets.IMG_PASSWORD }}
-
-
- - name: Build and push
- uses: docker/build-push-action@v4
- with:
- context: .
- file: ./Dockerfile
- platforms: linux/amd64
- push: true
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
-
- sync-git:
- name: Sync to Git
- runs-on: [self-hosted,linux]
- needs:
- - build
- steps:
- - name: Sync to Gitlab
- uses: aiworklab/git-mirror-action@master
- env:
- SSH_PRIVATE_KEY: ${{ secrets.GITLAB_RSA_PRIVATE_KEY }}
- with:
- source-repo: [email protected]:apache/incubator-answer.git
- destination-repo: ${{ secrets.GITLAB_REPO }}
-
diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml
deleted file mode 100644
index 99c2b52d..00000000
--- a/.github/workflows/build_test.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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: Build Test
-
-on:
- push:
- branches:
- - 'dev'
- pull_request:
- branches:
- - 'dev'
-
-jobs:
- node-build-test:
- name: Node Build Test
- runs-on: [self-hosted, linux]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Set up Go
- uses: actions/setup-node@v3
- with:
- node-version: 16
-
- - name: Test Build
- run: make install-ui-packages ui
-
- go-build-test:
- name: Go Build Test
- runs-on: [self-hosted, linux]
- needs:
- - node-build-test
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Set up Go
- uses: actions/setup-go@v3
- with:
- go-version: 1.18
-
- - name: Go Test Build
- run: make clean build
diff --git a/.github/workflows/ci.yml b/.github/workflows/check-asf-header.yml
similarity index 100%
rename from .github/workflows/ci.yml
rename to .github/workflows/check-asf-header.yml