3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-17 19:17:45 +00:00

fix: update test skip logic to use custom env (#2242)

This commit is contained in:
Tonye Jack 2024-08-21 03:43:42 -06:00 committed by GitHub
parent 246859db91
commit b4c0974161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -68,8 +68,9 @@ jobs:
- name: Run build and test
run: |
env
yarn all
env:
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v20

View file

@ -660,7 +660,7 @@ describe('utils test', () => {
})
describe('getPreviousGitTag', () => {
// Check if the environment variable GITHUB_REPOSITORY_OWNER is 'tj-actions'
const shouldSkip = process.env.GITHUB_REPOSITORY_OWNER !== 'tj-actions'
const shouldSkip = !!process.env.GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK
// Function returns the second-latest tag and its SHA
it('should return the second latest tag and its SHA when multiple tags are present', async () => {
if (shouldSkip) {