Skip to content

Commit

Permalink
fix: merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulgalimov committed May 6, 2024
2 parents c20b698 + 5071f2b commit ace95a9
Show file tree
Hide file tree
Showing 4 changed files with 1,452 additions and 1,282 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:
jobs:
build:
name: Build and push Docker Image
uses: UniqueNetwork/web-deploy/.github/workflows/build-docker-image.yml@master
uses: UniqueNetwork/unique-marketplace-backend/.github/workflows/build-docker-image.yml@master
secrets: inherit
with:
tag: unique-marketplace-backend
dockerfile: ./Dockerfile
target: static
is_latest: false

# todo: implement, just a placeholder for now
# todo: implement, just a placeholder for now
deploy:
needs: [build]
name: Deploy
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Docker image

on:
workflow_call:
inputs:
image:
type: string
description: image
default: uniquenetwork/unique-web
tag:
type: string
description: tag
required: true
push:
type: boolean
description: is push
default: false
dockerfile:
type: string
description: dockerfile path
default: ./Dockerfile
target:
type: string
description: build target
required: false
is_latest:
type: string
description: also push latest tag
default: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ${{ inputs.dockerfile }}
push: true
tags: ${{ inputs.image }}:${{ inputs.tag }}-${{ github.sha }}${{ inputs.is_latest == 'true' && ',' || '' }}${{ inputs.is_latest == 'true' && inputs.image || '' }}${{ inputs.is_latest == 'true' && ':' || '' }}${{ inputs.is_latest == 'true' && inputs.tag || '' }}${{ inputs.is_latest == 'true' && '-latest' || '' }}
target: ${{ inputs.target }}
Loading

0 comments on commit ace95a9

Please sign in to comment.