Skip to content

Commit

Permalink
Revert "Add job to check format difference (#2214)"
Browse files Browse the repository at this point in the history
This reverts commit 72a8582.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent 33dafe3 commit d8781b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
37 changes: 1 addition & 36 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
push:
branches:
- main
pull_request:

jobs:
dump-contexts-to-log:
Expand All @@ -28,7 +27,7 @@ jobs:
- uses: ./.github/actions/dump-context

format:
if: ${{ github.event_name == 'push' }}
name: Run formatter
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
Expand Down Expand Up @@ -91,37 +90,3 @@ jobs:
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 }}

check-format-diff:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.DISPATCH_TOKEN }}

- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup Go environment
uses: ./.github/actions/setup-go

- name: Run formatter and license.go
run: |
make deps/install
make format
git checkout go.mod go.sum
- name: Check format difference
continue-on-error: true
run: |
if git diff --quiet --exit-code; then
echo "Nothing updated"
else
echo "Please execute \`make format\` locally."
exit 1
fi
4 changes: 2 additions & 2 deletions Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \
&& tar xzvf helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \
&& 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 \
&& mv helm-docs $(BINDIR)/helm-docs

.PHONY: helm/package/vald
Expand Down

0 comments on commit d8781b1

Please sign in to comment.