diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 305dea9c..124061f7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,49 +1,39 @@ name: Docker CI - on: push: tags: - "*" - jobs: buildx: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: 16.x - - name: NPM Install run: | npm install - - name: NPM Lint run: | npm run lint - - name: NPM Build id: npm-build - run: | + run: > npm run build - echo "::set-output name=version::$(grep '"version":' package.json -m1 | cut -d\" -f4)" + echo "::set-output name=version::$(grep '"version":' package.json -m1 | cut -d\" -f4)" - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - # Docker Username and Password have to be set as secrets in GitHub repo. - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push base-image uses: docker/build-push-action@v2 with: @@ -54,7 +44,6 @@ jobs: tags: | coderaiser/cloudcmd:latest coderaiser/cloudcmd:${{ steps.npm-build.outputs.version }} - - name: Build and push alpine-image uses: docker/build-push-action@v2 with: diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f87c88a8..768c0d10 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,57 +1,40 @@ name: Node CI - -on: [push] - +on: + - push jobs: build: runs-on: ubuntu-latest env: NAME: cloudcmd - strategy: matrix: node-version: - 14.x - 16.x + - 17.x steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - - name: Install Redrun - run: - npm i redrun -g - + run: npm i redrun -g - name: Install - run: - npm install - + run: npm install - name: Lint - run: - redrun fix:lint - + run: redrun fix:lint - name: Commit fixes uses: EndBug/add-and-commit@v7 with: - message: 'chore(${{ env.NAME }}) lint using actions' - + message: chore(${{ env.NAME }}) lint using actions - name: Build - run: - redrun build - + run: redrun build - name: Test - run: - redrun test - + run: redrun test - name: Coverage - run: - redrun coverage coverage:report - + run: redrun coverage coverage:report - name: Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} -