From ef34a80d4365fe7f68f587ebb1e3e897997be750 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:24:32 +0800 Subject: [PATCH 1/9] fix --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b789d764..275e606d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,8 +29,8 @@ jobs: with: go-version: 1.18 - - name: Test - run: go test -v ./... + # - name: Test + # run: go test -v ./... - name: Test Build run: go build -v ./... From 15234901299583f9032c65b1d4d7388ea9f3f88f Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:27:36 +0800 Subject: [PATCH 2/9] fix test --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 275e606d..aedc1256 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,16 +24,16 @@ jobs: uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 + # - name: Set up Go + # uses: actions/setup-go@v3 + # with: + # go-version: 1.18 # - name: Test # run: go test -v ./... - - name: Test Build - run: go build -v ./... + # - name: Test Build + # run: go build -v ./... - name: Login to ghcr.io uses: docker/login-action@v1 From 817fd5e2af51c7eaf0558e23c304ebcc059297e4 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:32:41 +0800 Subject: [PATCH 3/9] fix --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aedc1256..b07e9783 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: env: REGISTRY: ghcr.io - IMAGE: answerdev/answer + IMAGE: aichy126/answer jobs: build-and-push: From f58550c0090a5da05c1f2c017848508d8259fd9e Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:55:45 +0800 Subject: [PATCH 4/9] fix --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..85c15f70 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Build Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + +env: + REGISTRY: ghcr.io + IMAGE: aichy126/answer + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + # - name: Test + # run: go test -v ./... + + - name: Test Build + run: make clean build From 024fe0174e33ced036f9bb7758baf7778c2a4f03 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 12:17:40 +0800 Subject: [PATCH 5/9] github actions --- .../workflows/{build.yml => build_img.yml} | 12 ---------- .../workflows/{test.yml => go_build_test.yml} | 11 ++------- .github/workflows/node_build_test.yml | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+), 21 deletions(-) rename .github/workflows/{build.yml => build_img.yml} (86%) rename .github/workflows/{test.yml => go_build_test.yml} (69%) create mode 100644 .github/workflows/node_build_test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build_img.yml similarity index 86% rename from .github/workflows/build.yml rename to .github/workflows/build_img.yml index b07e9783..36bf96e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_img.yml @@ -23,18 +23,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - # - name: Set up Go - # uses: actions/setup-go@v3 - # with: - # go-version: 1.18 - - # - name: Test - # run: go test -v ./... - - # - name: Test Build - # run: go build -v ./... - - name: Login to ghcr.io uses: docker/login-action@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/go_build_test.yml similarity index 69% rename from .github/workflows/test.yml rename to .github/workflows/go_build_test.yml index 85c15f70..ecd2f4f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/go_build_test.yml @@ -1,4 +1,4 @@ -name: Build Test +name: Go Build Test on: push: @@ -7,10 +7,6 @@ on: branches: [ "main" ] -env: - REGISTRY: ghcr.io - IMAGE: aichy126/answer - jobs: build-and-push: runs-on: ubuntu-latest @@ -24,8 +20,5 @@ jobs: with: go-version: 1.18 - # - name: Test - # run: go test -v ./... - - - name: Test Build + - name: Go Test Build run: make clean build diff --git a/.github/workflows/node_build_test.yml b/.github/workflows/node_build_test.yml new file mode 100644 index 00000000..edf5b8cb --- /dev/null +++ b/.github/workflows/node_build_test.yml @@ -0,0 +1,23 @@ +name: Node Build Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-and-push: + runs-on: ubuntu-latest + + 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 From 7b374aeb62e66501fe163ae3d49b3b09ad694dbf Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:29 +0800 Subject: [PATCH 6/9] update github workflows --- .github/workflows/build_img.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_img.yml b/.github/workflows/build_img.yml index 36bf96e3..ec3106b4 100644 --- a/.github/workflows/build_img.yml +++ b/.github/workflows/build_img.yml @@ -44,7 +44,7 @@ jobs: file: ./Dockerfile builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ steps.meta.outputs.tags }} + tags: latest labels: ${{ steps.meta.outputs.labels }} # - name: build to hub.docker From 063c41bd6e60afff061847e757354a5ddcc3f2b9 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:52:37 +0800 Subject: [PATCH 7/9] fix --- .github/workflows/build_img.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_img.yml b/.github/workflows/build_img.yml index ec3106b4..a72dcb5c 100644 --- a/.github/workflows/build_img.yml +++ b/.github/workflows/build_img.yml @@ -36,6 +36,13 @@ jobs: uses: docker/metadata-action@v3 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE }} + tags: | + type=ref,event=branch + type=sha + type=sha,prefix={{branch}}- + type=sha,format=long + type=sha,format=long,prefix={{branch}}- + type=raw,value=latest - name: Build Img uses: docker/build-push-action@v3 @@ -44,7 +51,7 @@ jobs: file: ./Dockerfile builder: ${{ steps.buildx.outputs.name }} push: true - tags: latest + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # - name: build to hub.docker From 5acbffbd1249e60c5b836031b41bbb61a4555aff Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 17:36:13 +0800 Subject: [PATCH 8/9] fix --- .github/workflows/build_img.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build_img.yml b/.github/workflows/build_img.yml index a72dcb5c..553482b3 100644 --- a/.github/workflows/build_img.yml +++ b/.github/workflows/build_img.yml @@ -37,11 +37,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE }} tags: | - type=ref,event=branch - type=sha - type=sha,prefix={{branch}}- - type=sha,format=long - type=sha,format=long,prefix={{branch}}- type=raw,value=latest - name: Build Img From 3944441fbb7629afc83d2f2d2a071174efa633e7 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 13 Oct 2022 18:02:44 +0800 Subject: [PATCH 9/9] update github workflow --- .github/workflows/build_img.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_img.yml b/.github/workflows/build_img.yml index 553482b3..4ec29ce8 100644 --- a/.github/workflows/build_img.yml +++ b/.github/workflows/build_img.yml @@ -9,7 +9,7 @@ on: env: REGISTRY: ghcr.io - IMAGE: aichy126/answer + IMAGE: answerdev/answer jobs: build-and-push: