Skip to content

Commit

Permalink
Add release pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
florianrusch-zf committed Oct 20, 2022
1 parent 3e84052 commit a584b47
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
with:
distribution: zulu
java-version: 11

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: API-Wrapper - Run gradle build on PRs
on: pull_request
# release:
# types: [publish]

env:
REGISTRY: ghcr.io
IMAGE_NAME: consumer-api-wrapper

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
build-root-directory: api-wrapper/services/api-wrapper
arguments: build

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# minimal
# type=pep440,pattern={{version}}
type=raw,value=0.1.0-SNAPSHOT
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: api-wrapper/services/api-wrapper
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
JAR=build/libs/edc.jar

0 comments on commit a584b47

Please sign in to comment.