mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-01-17 00:06:00 -05:00
Merge branch 'quality_assurance' of github.com:Josh-Larson/Holocore into quality_assurance
This commit is contained in:
43
.github/workflows/deploy.yml
vendored
Normal file
43
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set up JDK 12
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 12
|
||||
- name: Build
|
||||
run: ./gradlew --no-daemon clean test jlink
|
||||
- name: Docker Login
|
||||
run: docker login docker.pkg.github.com -u "${{ secrets.DOCKER_USER }}" -p "${{ secrets.DOCKER_PASS }}"
|
||||
- name: Docker Build & Push
|
||||
run: |
|
||||
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
|
||||
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
|
||||
docker build -t "$IMAGE_NAME:$RELEASE_NAME" .
|
||||
docker push "$IMAGE_NAME:$RELEASE_NAME"
|
||||
- name: Docker Push to QA
|
||||
if: github.event.release.prerelease
|
||||
run: |
|
||||
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
|
||||
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
|
||||
docker tag "$IMAGE_NAME:$RELEASE_NAME" "$IMAGE_NAME:quality_assurance"
|
||||
docker push "$IMAGE_NAME:quality_assurance"
|
||||
- name: Docker Push to Master
|
||||
if: github.event.release.prerelease == false
|
||||
run: |
|
||||
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
|
||||
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
|
||||
docker tag "$IMAGE_NAME:$RELEASE_NAME" "$IMAGE_NAME:latest"
|
||||
docker push "$IMAGE_NAME:latest"
|
||||
@@ -1,9 +1,14 @@
|
||||
name: Java Test
|
||||
name: Gradle Test
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- quality_assurance
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -15,7 +20,5 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 12
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Test with Gradle
|
||||
run: ./gradlew test
|
||||
run: ./gradlew --no-daemon test
|
||||
Reference in New Issue
Block a user