Skip to content

Commit

Permalink
Merge pull request #4 from ethanhanjiahao/main
Browse files Browse the repository at this point in the history
chore: update workflow name to docker build
  • Loading branch information
markGbug authored Aug 9, 2022
2 parents 40b0cdb + 5910644 commit 1501436
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Docker Build
on:
push:
branches:
- main
- release-*
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml -Dmaven.test.skip
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
file: ./gateway-portal/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/hango-portal:latest

0 comments on commit 1501436

Please sign in to comment.