Skip to content

Clean workspace action using JavaScript ๐Ÿงน

License

Notifications You must be signed in to change notification settings

yumis-coconudge/clean-workspace-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

62 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Clean Workspace Action ๐Ÿ—‘

๐Ÿ’ก English

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•œ ์›Œํฌ์ŠคํŽ˜์ด์Šค ๋น„์šฐ๊ธฐ ์•ก์…˜์ž…๋‹ˆ๋‹ค. Self-hosted runner์—์„œ ์‚ฌ์šฉํ•˜๊ธฐ์— ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์–ด๋– ํ•œ OS์—์„œ๋“  ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ๋ฒ•

๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ•

์›Œํฌ์ŠคํŽ˜์ด์Šค๋ฅผ ๋น„์›๋‹ˆ๋‹ค. ์›Œํฌ์ŠคํŽ˜์ด์Šค ๊ฒฝ๋กœ๋Š” ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค. (GITHUB_WORKSPACE)

# ...
name: Some workflows
jobs:
  build:
    name: Some build
    runs-on: macos-latest
    steps:
      - uses: yumis-coconudge/[email protected]
# ...

๊ณ ๊ธ‰ ์‚ฌ์šฉ๋ฒ•

additional-path์„ ์ด์šฉํ•˜๋ฉด ์›Œํฌ์ŠคํŽ˜์ด์Šค์™€ ํ•จ๊ป˜ ํŠน์ • ๋””๋ ‰ํ† ๋ฆฌ ๋˜๋Š” ํŒŒ์ผ๋“ค์„ ๊ฐ™์ด ๋น„์›๋‹ˆ๋‹ค.
์กด์žฌํ•˜์ง€ ์•Š์€ ํŒŒ์ผ์€ ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค.

๊ฒฝ๊ณ : ์ž˜๋ชป๋œ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๊ฒŒ๋˜๋ฉด ๋ณต๊ตฌํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์กฐ์‹ฌํ•˜์„ธ์š”.

# ...
name: Some workflows
jobs:
  build:
    name: Some build
    runs-on: macos-latest
    steps:
      - name: Get yarn cache directory.
        id: yarn-cache-dir-path
        run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

      # ์›Œํฌ์ŠคํŽ˜์ด์Šค์™€ Yarn ์บ์‹œ ๊ฒฝ๋กœ๋ฅผ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
      - uses: yumis-coconudge/[email protected]
        with:
          additional-path: "${{ steps.yarn-cache-dir-path.outputs.dir }}"
# ...

์—ฌ๋Ÿฌ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, ","๋กœ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋˜ํ•œ, glob ํŒจํ„ด์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

# ...
name: Some workflows
jobs:
  build:
    name: Some build
    runs-on: macos-latest
    steps:
      - name: Get yarn cache directory.
        id: yarn-cache-dir-path
        run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

      - uses: yumis-coconudge/[email protected]
        with:
          additional-path: "~/a.txt,~/b.txt"
# ...