From 40547de0381b1b1368fa6a42f3b50dad3ae8d31e Mon Sep 17 00:00:00 2001 From: hlts2 Date: Wed, 18 Oct 2023 18:08:46 +0900 Subject: [PATCH 1/3] fix: delete auto format pr creation logic Signed-off-by: hlts2 --- .github/workflows/format.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index d343da197b..23f2000957 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -71,22 +71,6 @@ jobs: if git diff --quiet --exit-code; then echo "Nothing updated" else - git add . - git commit -S --signoff -m ":robot: Update license headers / Format Go codes and YAML files" - - git remote set-url origin "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" - git push -u origin ${BRANCH_NAME} - - curl --include --verbose --fail \ - -H "Accept: application/json" \ - -H "Content-Type:application/json" \ - -H "Authorization: token ${GITHUB_TOKEN}" \ - --request POST \ - --data "{\"title\": \"Update license headers / Format codes\", \"head\": \"${BRANCH_NAME}\", \"base\": \"main\", \"body\": \"Update license headers / Format Go codes and YAML files.\", \"maintainer_can_modify\": true}" \ - $API_URL + echo "Please execute \`make format\` locally." + exit 1 fi - env: - GITHUB_USER: ${{ secrets.DISPATCH_USER }} - GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }} - API_URL: https://api.github.com/repos/vdaas/vald/pulls - BRANCH_NAME: ${{ steps.switch_to_new_branch.outputs.BRANCH_NAME }} From 0f18d5d242c1640115177f5183df8684081b2cc1 Mon Sep 17 00:00:00 2001 From: hlts2 Date: Wed, 18 Oct 2023 18:11:44 +0900 Subject: [PATCH 2/3] fix: workflow execution trigger Signed-off-by: hlts2 --- .github/workflows/format.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 23f2000957..c1a3847ae1 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -15,9 +15,7 @@ # name: Run formatter on: - push: - branches: - - main + pull_request: jobs: dump-contexts-to-log: @@ -65,8 +63,7 @@ jobs: make format git checkout go.mod go.sum - - name: Check and Push to main branch - continue-on-error: true + - name: Check git difference run: | if git diff --quiet --exit-code; then echo "Nothing updated" From 82beac1612de5a8920f6fb34c1fa25d003b990fb Mon Sep 17 00:00:00 2001 From: hlts2 Date: Wed, 18 Oct 2023 18:21:01 +0900 Subject: [PATCH 3/3] fix: helm-docs installation url Signed-off-by: hlts2 --- Makefile.d/helm.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 663a71ed54..9d69b9063e 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -29,8 +29,8 @@ helm-docs/install: $(BINDIR)/helm-docs $(BINDIR)/helm-docs: mkdir -p $(BINDIR) cd $(TEMP_DIR) \ - && curl -LO https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/helm-docs_$(UNAME)_$(ARCH).tar.gz \ - && tar xzvf helm-docs_$(UNAME)_$(ARCH).tar.gz \ + && curl -LO https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \ + && tar xzvf helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \ && mv helm-docs $(BINDIR)/helm-docs .PHONY: helm/package/vald