Skip to content

everything is pain

everything is pain #24

Workflow file for this run

name: Build & Publish (Root)
on:
push:
branches:
- root
paths-ignore:
- "yaml-files/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 1.17
- name: Gradle (Build)
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Upload artifacts (Main JAR)
uses: actions/upload-artifact@v2
with:
name: Main JAR
path: build/libs/*-all.jar
- name: Upload artifacts (JARs)
uses: actions/upload-artifact@v2
with:
name: JARs
path: build/libs/*.jar
- name: Upload artifacts (Module JARs)
uses: actions/upload-artifact@v2
with:
name: Module JARs
path: module-*/build/libs/*.jar
#TODO conditionally skip this if secrets not present
# - name: Gradle (Publish)
# uses: gradle/gradle-build-action@v2
# with:
# arguments: |
# publish
# "-Pmaven.url.snapshots=${{ secrets.SNAPSHOTS_URL }}"
# "-Pmaven.url.releases=${{ secrets.MAVEN_URL }}"
# "-Pmaven.user=${{ secrets.MAVEN_USERNAME }}"
# "-Pmaven.password=${{ secrets.MAVEN_PASSWORD }}"
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}