refactor: remove caching steps for checkout, Go modules, and golangci-lint in deployment workflow

This commit is contained in:
2026-01-10 16:44:37 +08:00
parent fdadbc7216
commit c6e3c2f589

View File

@@ -21,13 +21,6 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Cache checkout
uses: actions/cache@v3
with:
path: ${{ gitea.workspace }}
key: ${{ runner.os }}-checkout-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-checkout-
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository - name: List files in the repository
@@ -36,22 +29,8 @@ jobs:
- name: Check go version - name: Check go version
run: | run: |
go version go version
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run golangci-lint - name: Run golangci-lint
uses: golangci/golangci-lint-action@v9 uses: golangci/golangci-lint-action@v9
- name: Cache golangci-lint
uses: actions/cache@v3
with:
path: ~/.cache/golangci-lint
key: ${{ runner.os }}-golangci-lint-${{ hashFiles('.golangci.yml') }}
restore-keys: |
${{ runner.os }}-golangci-lint-
- name: Tests - name: Tests
run: | run: |
cd ${{ gitea.workspace }} cd ${{ gitea.workspace }}
@@ -78,6 +57,7 @@ jobs:
kubectl version --client kubectl version --client
- name: Set up Kubeconfig - name: Set up Kubeconfig
run: | run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBECONFIG_DATA }}" | base64 --decode > $HOME/.kube/config echo "${{ secrets.KUBECONFIG_DATA }}" | base64 --decode > $HOME/.kube/config
- name: Deploy to Kubernetes - name: Deploy to Kubernetes
run: | run: |