Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
min2ha authored Aug 19, 2021
1 parent c3fed77 commit 3d5c39b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
branches:
- master
- dev

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
UKWA-UI_build_and_push_to_registry_job:
runs-on: ubuntu-latest
name: A job to build and push docker
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build with Maven
run: mvn clean package -Dmaven.test.skip=true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
pull: true
push: true
cache-from: type=registry,ref=min2ha/ukwa-ui:latest
cache-to: type=inline
tags: min2ha/ukwa-ui:latest
# build-args: PROFILE=dev,ARG2=test

0 comments on commit 3d5c39b

Please sign in to comment.