Skip to content

new annon

new annon #154

Workflow file for this run

name: CI/CD
on:
push:
branches:
- main
jobs:
deps:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14.20.0]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint and/or test
run: |
yarn
env:
CI: true
build:
needs: deps
runs-on: ubuntu-20.04
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
steps:
-
name: Check Out Repo
uses: actions/checkout@v2
-
name: Login to Docker Hub
uses: docker/login-action@v1
if: ${{env.DOCKERHUB_USERNAME != 0}}
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
if: ${{env.DOCKERHUB_USERNAME != 0}}
with:
context: ./
file: ./Dockerfile
push: true
tags: ecency/api:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}