Skip to content

chore(deps): update actions/setup-java action to v4 #31

chore(deps): update actions/setup-java action to v4

chore(deps): update actions/setup-java action to v4 #31

Workflow file for this run

name: Build and push move2kube Knative function container image
on:
workflow_call:
inputs:
push_pr:
required: false
type: boolean
default: true
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'move2kube/m2k-func/**'
- 'pipeline/**'
- .github/workflows/m2k-func.yaml
env:
WORKDIR: move2kube/m2k-func
MVN_OPTS: ""
jobs:
build-and-push-m2k-func:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build Java projects
run: |
cd ${WORKDIR}
cd move2kubeAPI
make install
cd ..
mvn ${MVN_OPTS} -B clean package -DskipTests
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
context: ${{ env.WORKDIR }}
image: serverless-workflow-m2k-kfunc
tags: latest ${{ github.sha }}
extra-args: --ulimit nofile=4096:4096
containerfiles: |
${{ env.WORKDIR }}/src/main/docker/Dockerfile.jvm
- name: Buildah push to OCI Arcive
if: ${{ ! inputs.push_pr }}
run: |
buildah push serverless-workflow-m2k-kfunc:${{ github.sha }} \
oci-archive:serverless-workflow-m2k-kfunc-${{ github.sha }}.tar:kind.local/orchestrator/serverless-workflow-m2k-kfunc:${{ github.sha }}
- name: Save OCI archive
if: ${{ ! inputs.push_pr }}
uses: actions/upload-artifact@v4
with:
name: serverless-workflow-m2k-kfunc-${{ github.sha }}.tar
path: serverless-workflow-m2k-kfunc-${{ github.sha }}.tar
- name: Push To quay.io
if: ${{ inputs.push_pr }}
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/orchestrator
username: ${{ secrets.NEW_QUAY_USERNAME }}
password: ${{ secrets.NEW_QUAY_PASSWORD }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"