Skip to content

Main branch

Main branch #131

Workflow file for this run

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 }}