Skip to content

Commit 1b96200

Browse files
committed
Link to maven container publish action
1 parent 726c707 commit 1b96200

File tree

1 file changed

+12
-42
lines changed

1 file changed

+12
-42
lines changed

.github/workflows/docker_publish.yml

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,18 @@ on:
1616
types: [published]
1717

1818
jobs:
19-
docker:
19+
build:
20+
name: Build
2021
runs-on: ubuntu-latest
2122
steps:
22-
- uses: actions/checkout@main
23+
- uses: fugerit-org/psychic-actions/maven-container-publish@mcp
2324
with:
24-
# Shallow clones should be disabled for a better relevancy of analysis
25-
fetch-depth: 0
26-
- name: Echo ref name trigger
27-
run: echo ${{ github.ref_name }}
28-
- name: Set up JDK 17
29-
uses: actions/setup-java@main
30-
with:
31-
java-version: '17'
32-
distribution: 'corretto'
33-
cache: 'maven'
34-
- name: Cache Maven packages
35-
uses: actions/cache@main
36-
with:
37-
path: ~/.m2
38-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
39-
restore-keys: ${{ runner.os }}-m2
40-
- uses: actions/setup-node@main
41-
with:
42-
node-version: 20
43-
- name: Build main project
44-
run: mvn -B clean install -P full,coverage,metadata,buildreact
45-
- name: Build quarkus project
46-
run: cd fj-doc-playground-quarkus;mvn -B clean install -P full,coverage,metadata,buildreact
47-
# using action https://github.com/marketplace/actions/build-and-push-docker-images
48-
- name: Set up QEMU
49-
uses: docker/setup-qemu-action@master
50-
- name: Set up Docker Buildx
51-
uses: docker/setup-buildx-action@master
52-
- name: Login to Docker Hub
53-
uses: docker/login-action@master
54-
with:
55-
username: ${{ secrets.DOCKERHUB_USERNAME }}
56-
password: ${{ secrets.DOCKERHUB_TOKEN }}
57-
- name: Build and push
58-
uses: docker/build-push-action@master
59-
with:
60-
context: fj-doc-playground-quarkus
61-
platforms: linux/amd64,linux/arm64
62-
push: true
63-
tags: fugeritorg/fj-doc-playground-quarkus:${{ github.ref_name }},fugeritorg/fj-doc-playground-quarkus:latest
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
maven-options: -B clean package -P test,buildreact
27+
docker-context: 'fj-doc-playground-quarkus'
28+
docker-file: './fj-doc-playground-quarkus/Dockerfile'
29+
docker-platforms: linux/amd64,linux/arm64
30+
docker-tags: ${{ secrets.DOCKERHUB_USERNAME }}/fj-doc-playground-quarkus:${{ github.ref_name }},${{ secrets.DOCKERHUB_USERNAME }}/fj-doc-playground-quarkus:latest
31+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
33+

0 commit comments

Comments
 (0)