-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.02 KB
/
api-server.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
name: directory list
on:
workflow_dispatch:
push:
branches:
- main
jobs:
server-application:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Gradle Caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_ACCESS_TOKEN }}
logout: true
- name: Build and push
run: |
chmod +x ./gradlew
version=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
./gradlew jib -Djib.to.tags=latest,${version}