Skip to content

Commit

Permalink
feat: reverting docker changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sr4850 committed Sep 13, 2024
1 parent c42cb5d commit 1681d93
Showing 1 changed file with 12 additions and 42 deletions.
54 changes: 12 additions & 42 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Maven Build
name: Maven

on:
workflow_call:
Expand All @@ -8,50 +8,20 @@ on:
required: true
default: 'package'
type: string

permissions:
contents: read
packages: write

jobs:
build:
name: Maven Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Generate Maven settings.xml
uses: whelk-io/maven-settings-xml-action@v22
with:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } },{ "id":"github-publish", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'

- name: Build with Maven
run: mvn -B -P github ${{ inputs.maven-goal }}

- name: Cache built JAR
uses: actions/cache@v4
with:
path: target/*.jar
key: ${{ runner.os }}-artifact-${{ hashFiles('**/pom.xml') }}

- name: Upload JAR Artifact
uses: actions/upload-artifact@v4
with:
name: test-jar
path: target/*.jar

- run: mvn -B -P github ${{ inputs.maven-goal}}

0 comments on commit 1681d93

Please sign in to comment.