Skip to content

Commit

Permalink
small improvements of github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ReDBrother committed Feb 13, 2024
1 parent a40eefb commit 5a4f998
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
prettier_options: --write **/*.{js,md}

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

- name: Build docker image for codebattle bot
run: make docker-build-chat-bot
run: make docker-build
- name: Push docker image for codebattle bot
run: make docker-push-chat-bot
run: make docker-push
29 changes: 18 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,38 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

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

- uses: actions/cache@v3
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install yarn dependencies
run: yarn install --froze-lockfile

- name: Eslint
run: yarn lint

- name: Run jest
run: yarn test

- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
prettier_options: --write **/*.{js,md}

- name: Run jest
run: yarn test

0 comments on commit 5a4f998

Please sign in to comment.