changed pipe with java 17 #189
Workflow file for this run
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 everytime push or merge | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
build: | |
strategy: | |
matrix: | |
environment: [dev] | |
name: "build" | |
runs-on: ubuntu-latest | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 | |
with: | |
role-to-assume: ${{ secrets.IAM_ROLE }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Setup JDK | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '17' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build, tag, and push docker image to Amazon ECR | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: ${{ vars.DOCKER_IMAGE_NAME}} | |
IMAGE_TAG: ${{ github.sha }} | |
run: | | |
mvn package -Pnative -Dquarkus.application.name=atm-layer-model -Dquarkus.profile=prod | |
docker build -f src/main/java/it/gov/pagopa/atmlayer/service/model/docker/Dockerfile.native -t $REGISTRY/$REPOSITORY:$IMAGE_TAG . \ | |
--build-arg QUARKUS_PROFILE=prod \ | |
--build-arg APP_NAME=atm-layer-model |