Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build and Test
on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out repository $GITHUB_WORKSPACE
- uses: actions/checkout@v2
# Build and Run Unit Tests
- name: Build and Run Unit Tests
run: mvn clean test
21 changes: 21 additions & 0 deletions .github/workflows/check-stable-dependency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Stable Dependencies
on: [pull_request, workflow_dispatch]

jobs:
check_dependency:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Resolve Dependencies
run: mvn dependency:resolve
- name: List and Check for snapshot
run: |
export SNAPSHOT_COUNT=$(mvn -o dependency:list | grep -e "SNAPSHOT" | wc -l)
if [ $SNAPSHOT_COUNT -gt 0 ]
then
exit 1
fi



50 changes: 50 additions & 0 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Docker
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to apply to the Docker file'
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-publish-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
jar_version: ${{ steps.package.outputs.jar_version }}
steps:
- uses: actions/checkout@v2
# Build and Run Unit Tests
- name: Package Jar
id: package
run: |
mvn package
echo "::set-output name=jar_version::$(mvn help:evaluate -Dexpression=project.version | grep -e '^[1-9][^\[]')"
- 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: |
type=sha,prefix=${{ steps.package.outputs.jar_version }}-,format=short
type=raw,value=${{ github.event.inputs.tag }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
JAR_VERSION=${{ steps.package.outputs.jar_version }}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<dependency>
<groupId>com.uid2</groupId>
<artifactId>enclave-attestation-api</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.uid2</groupId>
<artifactId>uid2-shared</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
Expand Down
29 changes: 0 additions & 29 deletions setup_dependencies.sh

This file was deleted.