Skip to content

change avatar, upload image, new dockerfile, new wofkflow #22

change avatar, upload image, new dockerfile, new wofkflow

change avatar, upload image, new dockerfile, new wofkflow #22

name: Docker-Publish
on:
push:
branches:
- main
tags:
- v*
pull_request:
env:
IMAGE_NAME: nftfrontend
IMAGE_TAG: latest
jobs:
build-service:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
- name: Build docker image
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:$IMAGE_TAG .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image
run: |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:$IMAGE_TAG
fi