Skip to content

Removing duplicate dependency (#591) #790

Removing duplicate dependency (#591)

Removing duplicate dependency (#591) #790

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
java-package: jdk
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install GPG Signing Key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
env:
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- name: Verify and Sign Jars
run: mvn -B clean verify -P -uberjar # No uber jars just yet.
env:
OSSRH_GPG_KEYNAME: ${{ secrets.OSSRH_GPG_KEYNAME }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- name: Deploy Snapshot (Central)
run: mvn -B deploy -Possrh,-uberjar -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_GPG_KEYNAME: ${{ secrets.OSSRH_GPG_KEYNAME }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Assembly
run: mvn clean package install -DskipTests && mvn -B --projects magpie-cli assembly:single -DskipTests
- name: Upload zip
uses: actions/upload-artifact@v2
with:
name: magpie-cli-zip
path: magpie-cli/target/*.zip
- name: Upload tar.gz
uses: actions/upload-artifact@v2
with:
name: magpie-cli-tar-gz
path: magpie-cli/target/*.tar.gz
docker-build:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: magpie-cli-tar-gz
path: magpie-cli/target/
- name: Quay Login
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker Build and Push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: quay.io/openraven/magpie:latest