From 57bfd01bdbff1fe4f879786df2bd507dec1ad8c0 Mon Sep 17 00:00:00 2001 From: Mayank Thakur Date: Mon, 6 Nov 2023 18:33:32 +0530 Subject: [PATCH] fix: failing ci - github actions upgraded go version to go1.18 --- .github/workflows/enforce-go-mod-tidy.yml | 2 ++ .github/workflows/pre-commit-hook-run.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/enforce-go-mod-tidy.yml b/.github/workflows/enforce-go-mod-tidy.yml index 5fde0909..0c2c8d7f 100644 --- a/.github/workflows/enforce-go-mod-tidy.yml +++ b/.github/workflows/enforce-go-mod-tidy.yml @@ -9,6 +9,8 @@ jobs: # When using actions/checkout in a custom container, the directory is not treated as a git repo and does not have a .git directory, therefore we need to initialize it as a git repo. This will allows us to track changes made after go mod tidy runs - name: Create a new git repository run: git init && git add --all && git -c user.name='test' -c user.email='test@example.com' commit -m 'init for pr action' + - name: Install latest go + run: wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin - name: Go mod tidy for root project run: go mod tidy - name: Go mod tidy for example apps diff --git a/.github/workflows/pre-commit-hook-run.yml b/.github/workflows/pre-commit-hook-run.yml index 9d8762bd..290c312b 100644 --- a/.github/workflows/pre-commit-hook-run.yml +++ b/.github/workflows/pre-commit-hook-run.yml @@ -20,4 +20,6 @@ jobs: with: node-version: '12' - run: git init && git add --all && git -c user.name='test' -c user.email='test@example.com' commit -m 'init for pr action' + - name: Install latest go + run: wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin - run: ./hooks/pre-commit.sh