-
Notifications
You must be signed in to change notification settings - Fork 293
39 lines (36 loc) · 1.36 KB
/
maven_push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Java CI Push
on: [push, pull_request]
jobs:
# This is from: https://github.com/fkirc/skip-duplicate-actions#example-1-skip-entire-jobs
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
cancel_others: 'true'
concurrent_skipping: 'same_content_newer'
do_not_skip: '["workflow_dispatch", "schedule", "merge_group", "pull_request"]'
build:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: aws-athena-query-federation_ubuntu-latest_16-core
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '11'
# Target java 8 to ensure that the source is compatible with java 8
- name: Build with Maven
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
run: mvn -B clean package -T 1C --file pom.xml -Dmaven.compiler.release=8 -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN --no-transfer-progress
# Identify if any files were modified as a result of running maven build.
- name: Identify any Maven Build changes
run: >
! (git status | grep "modified: " )