From 36184d9c387ad73f865b86701540ea8b7c38c825 Mon Sep 17 00:00:00 2001 From: Nathanaƫl Houn Date: Mon, 15 May 2023 00:21:21 +0200 Subject: fix(ci): version bump check when new recipe and multiple commits (#362) --- .github/workflows/check-pr.yml | 6 ++---- .github/workflows/check-recipe-version-bump/dist/index.js | 2 +- .github/workflows/check-recipe-version-bump/index.js | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index b7f37cd..def73ab 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -14,11 +14,9 @@ jobs: uses: actions/checkout@v3 - name: Fetch main branch run: git fetch origin main --depth 1 - - uses: lots0logs/gh-action-get-changed-files@2.1.4 + - uses: tj-actions/changed-files@v35 id: changed-files - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Checking recipe version bump uses: ./.github/workflows/check-recipe-version-bump with: - changed-files: ${{ steps.changed-files.outputs.modified }} + changed-files: ${{ steps.changed-files.outputs.modified_files }} diff --git a/.github/workflows/check-recipe-version-bump/dist/index.js b/.github/workflows/check-recipe-version-bump/dist/index.js index bccc451..92d622b 100644 --- a/.github/workflows/check-recipe-version-bump/dist/index.js +++ b/.github/workflows/check-recipe-version-bump/dist/index.js @@ -4063,7 +4063,7 @@ async function readFileFromGitBranch(branch, filename) { try { const changedFilesString = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('changed-files'); - const changedFiles = JSON.parse(changedFilesString); + const changedFiles = changedFilesString.split(' '); const changedFilesInRecipes = changedFiles .filter(filename => filename.startsWith('recipes/')) diff --git a/.github/workflows/check-recipe-version-bump/index.js b/.github/workflows/check-recipe-version-bump/index.js index 606c1bd..3c40480 100644 --- a/.github/workflows/check-recipe-version-bump/index.js +++ b/.github/workflows/check-recipe-version-bump/index.js @@ -32,7 +32,7 @@ async function readFileFromGitBranch(branch, filename) { try { const changedFilesString = core.getInput('changed-files'); - const changedFiles = JSON.parse(changedFilesString); + const changedFiles = changedFilesString.split(' '); const changedFilesInRecipes = changedFiles .filter(filename => filename.startsWith('recipes/')) -- cgit v1.2.3-54-g00ecf