Skip to content

Commit 288ebd8

Browse files
committed
build: add github actions
1 parent f149617 commit 288ebd8

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 11
18+
- name: Cache local Maven repository
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.m2/repository
22+
key: maven-${{ hashFiles('build.gradle') }}
23+
restore-keys: maven-
24+
- name: Build
25+
run: ./gradlew build

.github/workflows/docker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
name: Checkout code
13+
uses: actions/checkout@v2
14+
-
15+
name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
18+
-
19+
name: Login to DockerHub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
24+
25+
-
26+
name: Build and push
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
pull: true
31+
push: true
32+
tags: theprogrammershangout/judgebot:latest

0 commit comments

Comments
 (0)