-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.18 KB
/
docker-publish.yml
File metadata and controls
44 lines (42 loc) · 1.18 KB
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
name: Docker Image CI
on:
push:
branches:
- 'main'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build Bundle-API
run: |
chmod +x ./gradlew
./gradlew distTar
mkdir actions
cp ./build/distributions/Bundle-API-*.tar ./actions/Bundle-API.tar
- name: Build and push Docker images
uses: mr-smithers-excellent/docker-build-push@v4
with:
image: api/bundle
tag: ${{ steps.vars.outputs.sha_short }}
dockerfile: Dockerfile
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}