Merge pull request #36 from masayag/cleanup #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push jira-listener container image | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'escalation-eda/jira-listener/**' | |
env: | |
WORKDIR: escalation-eda/jira-listener | |
MVN_OPTS: "" | |
jobs: | |
build-and-push-jira-listener: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build Java projects | |
run: | | |
cd ${WORKDIR} | |
mvn ${MVN_OPTS} -B clean package | |
- name: Buildah Action | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: ${{ env.WORKDIR }} | |
image: serverless-workflow-jira-listener | |
tags: latest ${{ github.sha }} | |
extra-args: --ulimit nofile=4096:4096 | |
containerfiles: | | |
${{ env.WORKDIR }}/src/main/docker/Dockerfile.jvm | |
- name: Push To quay.io | |
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.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Print image url | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |