-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (61 loc) · 1.81 KB
/
main.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Main branch
on:
push:
branches: [ "main" ]
paths-ignore:
- .github/workflows/dockerFromTags.yml
- .github/workflows/pull_requests.yml
- '**/README.md'
- CONTRIBUTING.md
workflow_dispatch:
schedule:
# Weekly rebuild of Docker image
- cron: '38 11 * * 1'
concurrency:
group: docker-image
cancel-in-progress: true
env:
AWS_REGION: us-east-1
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17.0.9'
distribution: 'graalvm'
- name: Set up Node
uses: actions/[email protected]
with:
node-version: '16.x'
- name: Install Node dependencies
run: npm ci
working-directory: ./ep-tool-server
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: |
PROJECT_VERSION="$(grep projectVersion gradle.properties | awk -F '=' '{print $2}')"
./gradlew build dockerPush -P epsilonVersion=2.6.0 -P "dockerTags=latest,epsilon2.6,${PROJECT_VERSION},${PROJECT_VERSION}-epsilon2.6"
./gradlew clean build dockerPush -P epsilonVersion=2.5.0 -P "dockerTags=epsilon2.5,${PROJECT_VERSION}-epsilon2.5"
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: s3-test-reports
path: shorturl-s3-lambda/build/reports/tests
- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}