V
V
vaflya2020-01-10 19:40:50
GitHub
vaflya, 2020-01-10 19:40:50

How to setup github CI?

Good afternoon! Tell me how to set up Github actions for a node.js project and containerization in docker.
1. Set secrets in repository settings
2. Created a file in: .github/workflows/push.yml

on: push
name: npm build, lint, test and publish

jobs:
  build-and-publish:
    name: build and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - name: npm install
        uses: actions/[email protected]
        with:
          args: install
      - name: npm test
        uses: actions/[email protected]
        with:
          args: run test
      - name: npm lint
        uses: actions/[email protected]
        with:
          args: run lint

      - name: docker build
        uses: actions/docker/[email protected]
        with:
          args: build -t Vaflya/Project .
      - name: docker login
        uses: actions/docker/[email protected]
        env:
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
      - name: docker push
        uses: actions/docker/[email protected]
        with:
          args: push Vaflya/Project

Logs on github:
Current runner version: '2.163.1'
Prepare workflow directory
Prepare all required actions
Download action repository 'actions/[email protected]'
Download action repository 'actions/[email protected]'
##[warning]Failed to download action 'https://api.github.com/repos/actions/npm/tarball/master'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 26.98 seconds before retry.
##[warning]Failed to download action 'https://api.github.com/repos/actions/npm/tarball/master'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 20.185 seconds before retry.
##[error]Response status code does not indicate success: 404 (Not Found).

ps: Made according to an article on Medium here

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2020-01-10
@Kozack

https://github.com/actions/setup-node

V
vaflya, 2020-01-11
@vaflya

moderator delete the question. It's worded completely wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question