From 45fc70ccb524088bdc187f4ea626baa9aeb6dfae Mon Sep 17 00:00:00 2001 From: Lan Liang Date: Mon, 29 Jul 2024 14:00:51 +0000 Subject: [PATCH] chore: only trigger publish package workflow when mod files is change. Signed-off-by: Lan Liang --- .github/workflows/update_metadata.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_metadata.yaml b/.github/workflows/update_metadata.yaml index 5e10a389..e8af2cf6 100644 --- a/.github/workflows/update_metadata.yaml +++ b/.github/workflows/update_metadata.yaml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - "**.mod" env: KPM_REG: "docker.io" @@ -28,9 +30,9 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version-file: go.mod - name: Login run: kcl registry login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} docker.io