Skip to content

add github actions file #2

add github actions file

add github actions file #2

Workflow file for this run

name: build on maven
on:
watch:
types: [started]
pull_request:
types: [opened, reopened, edited, synchronize, ready_for_review]
push:
branches:
- main
- master
- 1.1.x
- '**'
workflow_dispatch:
jobs:
verify:
name: verify with maven
runs-on: ubuntu-latest
env:
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11 for x64
uses: actions/setup-java@v3
with:
distribution: 'temurin'
architecture: x64
java-version: |
11
- uses: s4u/[email protected]
with:
sonatypeSnapshots: true
- name: Build the serivce verify phase
run: mvn -B -V clean verify -Prun-its
build:
name: Build and push
runs-on: ubuntu-latest
needs: verify
if: ${{ github.event_name == 'push' }}
env:
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11 for x64
uses: actions/setup-java@v3
with:
distribution: 'temurin'
architecture: x64
java-version: |
11
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: commonjava/commonjava-images
path: commonjava-images
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
registry: quay.io
- name: Buildah build
id: buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: indy-archive-service
tags: ${{ github.ref_name }}
platforms: linux/amd64
containerfiles: |
commonjava-images/indy-archive-service/actions.Dockerfile
context: commonjava-images/indy-archive-service/
build-args: |
GIT_URL=https://github.com/${{ github.repository }}
GIT_REVISION=${{ github.ref }}
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.buildah-build.outputs.image }}
tags: ${{ steps.buildah-build.outputs.tags }}
registry: quay.io/factory2