Skip to content

Commit

Permalink
fix: change tmp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Sep 17, 2020
1 parent f45f8ef commit c27160f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/suggest-related-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ jobs:
- name: Cache dependencies
uses: actions/cache@v2
with:
path: /tmp/actions-suggest-related-links
key: ${{ runner.os }}-action-${{ hashFiles('/tmp/actions-suggest-related-links/training-data.json') }}
path: ~/actions-suggest-related-links-tmp
key: ${{ runner.os }}-action-${{ hashFiles('~/actions-suggest-related-links-tmp/training-data.json') }}
restore-keys: |
${{ runner.os }}-action-
- name: Setup model
if: github.event_name == 'issues' || github.event_name == 'pull_request'
run: |
cd ~
# git clone https://github.com/peaceiris/actions-suggest-related-links.git
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/peaceiris/actions-suggest-related-links.git
cd ./actions-suggest-related-links/models
# git checkout v1.0.0
Expand All @@ -52,14 +53,11 @@ jobs:
if: github.event_name == 'issues'
run: |
cd ~/actions-suggest-related-links/models/fasttext
ls -la /tmp/actions-suggest-related-links || true
ls -la ${GITHUB_WORKSPACE}
ls -la ${GITHUB_WORKSPACE}/actions-suggest-related-links
cp ${GITHUB_WORKSPACE}/actions-suggest-related-links/training-data.json .
cp ~/actions-suggest-related-links-tmp/training-data.json .
echo '${{ github.event.issue.title }} ${{ github.event.issue.body }}' > input.txt
python3 train.py -d training-data.json -test input.txt
- uses: peaceiris/actions-suggest-related-links@v0.8.7
- uses: peaceiris/actions-suggest-related-links@v0.8.8
if: github.event_name != 'pull_request'
with:
repository: 'peaceiris/actions-gh-pages'
3 changes: 2 additions & 1 deletion actions/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export async function run(): Promise<void> {
core.endGroup();
}

const tmpDir = path.join('/tmp', 'actions-suggest-related-links');
const userHome = `${process.env['HOME']}`;
const tmpDir = path.join(userHome, 'actions-suggest-related-links-tmp');
await io.mkdirP(tmpDir);

const eventName = context.eventName;
Expand Down

0 comments on commit c27160f

Please sign in to comment.