Skip to content

Update spring event executor #9

Update spring event executor

Update spring event executor #9

Workflow file for this run

name: Branch Build
on:
push:
branches:
- master
- release-*
- osoriano-release-*
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
# Use ghcr, in addition to Docker Hub
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
branch-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Log into Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log into ghcr
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.IMAGE_NAME }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'
cache: 'gradle'
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/}
echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')"
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: ./gradlew build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist
- name: Build and publish slim container image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.slim
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}