-
Notifications
You must be signed in to change notification settings - Fork 14
50 lines (43 loc) · 1.22 KB
/
publish.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
43
44
45
46
47
48
49
50
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
from:
type: string
description: 'Tag or sha to publish'
required: true
name: Publish
run-name: Publish from ${{inputs.from}}
jobs:
build:
runs-on: [ ubuntu-latest ]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{inputs.from}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.CONDUKTORBOT_DOCKER_HUB_USERNAME }}
password: ${{ secrets.CONDUKTORBOT_DOCKER_HUB_PAT }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github
- name: Build with Maven
run: mvn -B deploy --file pom.xml -pl '!logger-interceptor'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}