-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.07 KB
/
java.yml
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
name: Java (Publish Docker)
on:
push:
branches:
- main
pull_request:
jobs:
publish:
name: Publish to Docker Hub
runs-on: ubuntu-latest
defaults:
run:
working-directory: java
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Build WASM
run: mvn package
- name: Build OCI Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
context: java
image: marcnuri/hello-world-of-wasm
tags: java
containerfiles: java/Dockerfile
platforms: wasi/wasm
- name: Push To hub.docker.com
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}