Skip to content

Commit 5a4f998

Browse files
committed
small improvements of github actions
1 parent a40eefb commit 5a4f998

2 files changed

Lines changed: 21 additions & 14 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ jobs:
6060
prettier_options: --write **/*.{js,md}
6161

6262
- name: Login to Docker Hub
63-
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --pasword-stdin
63+
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
6464

6565
- name: Build docker image for codebattle bot
66-
run: make docker-build-chat-bot
66+
run: make docker-build
6767
- name: Push docker image for codebattle bot
68-
run: make docker-push-chat-bot
68+
run: make docker-push

.github/workflows/pr.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,38 @@ jobs:
2323
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
ref: ${{ github.head_ref }}
2929

30-
- name: Get yarn cache
31-
id: yarn-cache
32-
run: echo "::set-output name=dir::${yarn cache dir}"
30+
- name: Setup node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
3334

34-
- uses: actions/cache@v3
35+
- name: Cache node modules
36+
uses: actions/cache@v4
37+
env:
38+
cache-name: cache-node-modules
3539
with:
36-
path: ${{ steps.yarn-cache.outputs.dir }}
37-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
# npm cache files are stored in `~/.npm` on Linux/macOS
41+
path: ~/.npm
42+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
3843
restore-keys: |
39-
${{ runner.os }}-yarn-
44+
${{ runner.os }}-build-${{ env.cache-name }}-
45+
${{ runner.os }}-build-
46+
${{ runner.os }}-
4047
4148
- name: Install yarn dependencies
4249
run: yarn install --froze-lockfile
4350

4451
- name: Eslint
4552
run: yarn lint
4653

54+
- name: Run jest
55+
run: yarn test
56+
4757
- name: Prettify code
4858
uses: creyD/prettier_action@v4.3
4959
with:
5060
prettier_options: --write **/*.{js,md}
51-
52-
- name: Run jest
53-
run: yarn test

0 commit comments

Comments
 (0)