Skip to content

20 product variants support (#32) #15

20 product variants support (#32)

20 product variants support (#32) #15

name: publish backend-gateway
on:
push:
branches: ['dev']
paths: ['backend-gateway/**']
jobs:
test_build:
runs-on: self-hosted
defaults:
run:
working-directory: backend-gateway
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: dev
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Execute Gradle build
run: ./gradlew build
docker:
needs: test_build
name: build docker image backend-gateway
runs-on: self-hosted
defaults:
run:
working-directory: backend-gateway
steps:
- name: checkout code
uses: actions/checkout@v3
with:
ref: dev
- name: Make gradlew executable
run: |
chmod +x ./gradlew
- name: Execute Gradle bootBuildImage
run: ./gradlew bootBuildImage
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image to Docker Hub
run: docker push serhiibabanov/backend-gateway:latest