Skip to content

Commit bd143b8

Browse files
committed
automated tag
1 parent 24771a4 commit bd143b8

2 files changed

Lines changed: 37 additions & 58 deletions

File tree

.github/workflows/maven-publish copy.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/maven-publish.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
name: Maven Package
55

66
on:
7-
push
7+
release:
8+
types: [created]
89

910
jobs:
1011
build:
@@ -16,9 +17,41 @@ jobs:
1617

1718
steps:
1819
- uses: actions/checkout@v3
20+
21+
- name: Set up JDK 11
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '11'
25+
distribution: 'temurin'
26+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
27+
settings-path: ${{ github.workspace }} # location for the settings.xml file
1928

20-
- id: docker-tag
21-
uses: yuya-takeyama/docker-tag-from-github-ref-action@v1
29+
- name: Build with Maven
30+
run: mvn clean install
31+
32+
- name: Login to GitHub Container Registry
33+
uses: docker/login-action@v1
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
2238

2339
- name: Version
24-
run: echo ${{ steps.docker-tag.outputs.tag }}
40+
run: echo ${GITHUB_REF##*/}
41+
42+
- name: Set up QEMU
43+
uses: docker/setup-qemu-action@v2
44+
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v2
47+
48+
- id: docker-tag
49+
uses: yuya-takeyama/docker-tag-from-github-ref-action@v1
50+
51+
- name: Build and push
52+
uses: docker/build-push-action@v3
53+
with:
54+
context: .
55+
platforms: linux/amd64,linux/arm64
56+
push: true
57+
tags: ghcr.io/opentestingapi/opentesting:latest,ghcr.io/opentestingapi/opentesting:${{ steps.docker-tag.outputs.tag }}

0 commit comments

Comments
 (0)