-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace existing workflows so a release is built and pushed to Docker…
… Hub on merge to main We also no longer need to produce maven central releases – Docker Hub is the release platform.
- Loading branch information
1 parent
ffebed6
commit 9a6224e
Showing
4 changed files
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
name: Java CI | ||
name: Verify | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
distribution: 'adopt' | ||
- name: Build with Maven | ||
run: mvn --batch-mode --update-snapshots package | ||
run: mvn --batch-mode package |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{secrets.DOCKER_USERNAME}} | ||
password: ${{secrets.DOCKER_PASSWORD}} | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PROTEGEPROJECT_BOT_APP_ID }} | ||
private-key: ${{ secrets.PROTEGEPROJECT_BOT_APP_PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
ref: ${{ github.head_ref }} | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
server-id: docker.io | ||
server-username: DOCKER_USERNAME | ||
server-password: DOCKER_PASSWORD | ||
- name: Bump version | ||
id: bump | ||
uses: mickem/gh-action-bump-maven-version@v1 | ||
- name: Build and Publish package | ||
run: mvn --batch-mode -Prelease package dockerfile:push | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.bump.outputs.tag }} | ||
generate_release_notes: true | ||
|
||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}} |