forked from Onlineberatung/onlineBeratung-mailService
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from CaritasDeutschland/feature-github-registry
ci: 🎡 rm jenkins, docker image workflow & dockerfile changes
- Loading branch information
Showing
3 changed files
with
56 additions
and
40 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'dockerImage.v.*' | ||
|
||
jobs: | ||
test: | ||
name: Build and run unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup JVM | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8.0.181 | ||
java-package: jdk | ||
architecture: x64 | ||
|
||
- name: Caching maven dependencies | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: cache-maven-dependencies | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
- name: Maven Package | ||
run: mvn -B -Pprod clean package -DskipTests | ||
- name: Maven Verify | ||
run: mvn -B -Pprod clean verify | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: targetfiles | ||
path: target/*.jar | ||
push_to_registry: | ||
needs: [test] | ||
name: Push Docker image to GitHub Packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download buildfiles artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: targetfiles | ||
- name: Push to GitHub Packages | ||
uses: docker/build-push-action@v1.1.1 | ||
with: | ||
username: ${{ secrets.GH_PACKAGE_RELEASE_USER }} | ||
password: ${{ secrets.GH_PACKAGE_RELEASE_TOKEN }} | ||
registry: docker.pkg.github.com | ||
repository: caritasdeutschland/caritas-onlineberatung-mailservice/mailservice-image | ||
tag_with_ref: true |
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
This file was deleted.
Oops, something went wrong.