-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from KPMP/KPMP-5135_github-action-build-image
github action build image
- Loading branch information
Showing
3 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build delphinus-data docker image | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build-gradle-project: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get branch names | ||
id: branch-names | ||
uses: tj-actions/branch-names@v8 | ||
|
||
- name: Get current branch name | ||
if: steps.branch-names.outputs.is_default == 'false' | ||
run: | | ||
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}" | ||
- name: Checkout project sources | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: 7.4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.ENV_DOCKER_USER }} | ||
password: ${{ secrets.ENV_DOCKER_PASS }} | ||
|
||
- name: Run build with Gradle Wrapper | ||
run: | | ||
./gradlew build docker | ||
docker push "kingstonduo/delphinus-data:${{ steps.branch-names.outputs.current_branch }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters