npm ci to fix lint issue #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint.yml | |
buildx: | |
needs: [lint] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build stage setup | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha | |
load: true | |
target: setup | |
- name: Build stage lint | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha | |
load: true | |
target: linter | |
- name: Build stage unit test | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha | |
load: true | |
target: unit-tester | |
- name: Build stage build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha | |
load: true | |
target: builder | |
- name: Build stage release | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha | |
load: true | |
tags: blinkfile | |
- name: Acceptance test | |
run: cd test && make ci | |
- name: Docker login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: benjohns1/blinkfile:latest |