-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.64 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: G-Makers-server-CI
env:
JASYPT_PASSWORD: ${{ secrets.JASYPT_PASSWORD }}
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: create mysql docker container
run: |
sudo docker pull mysql
sudo docker run -d -p 3306:3306 --env MYSQL_DATABASE=opgg --env MYSQL_ROOT_PASSWORD=1234 mysql
- name : Set up JDK 11
uses: actions/setup-java@v1
with:
distribution: 'adopt'
java-version: '11'
- name : Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name : Build with Gradle
run: ./gradlew clean build
shell: bash
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ secrets.DOCKERHUB_TAG }}
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"
- name: Show Current Time
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}"
shell: bash