Skip to content

Quarkus Deploy Snapshots #2058

Quarkus Deploy Snapshots

Quarkus Deploy Snapshots #2058

name: Quarkus Deploy Snapshots
permissions:
contents: read
issues: write
packages: write
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
LANG: en_US.UTF-8
MVNW_REPOURL: https://maven-central.storage-download.googleapis.com/maven2
jobs:
build-and-deploy:
name: "Build and deploy"
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'
env:
MAVEN_OPTS: -Xmx6g -XX:MaxMetaspaceSize=2g -Dorg.slf4j.simpleLogger.log.eu.maveniverse=trace
steps:
- uses: actions/checkout@v6
with:
ref: main
- name: Get SHA
id: quarkus-sha
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Set up JDK 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Generate cache key
id: cache-key
run: |
CURRENT_BRANCH="${{ github.repository != 'quarkusio/quarkus' && 'fork' || github.base_ref || github.ref_name }}"
CURRENT_MONTH=$(/bin/date -u "+%Y-%m")
CURRENT_DAY=$(/bin/date -u "+%d")
ROOT_CACHE_KEY="m2-cache"
echo "m2-monthly-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}" >> $GITHUB_OUTPUT
echo "m2-monthly-branch-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
echo "m2-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}-${CURRENT_DAY}" >> $GITHUB_OUTPUT
- name: Restore Maven Repository
uses: actions/cache/restore@v5
with:
path: ~/.m2/repository
key: ${{ steps.cache-key.outputs.m2-cache-key }}
restore-keys: |
${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
- name: Build and Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./mvnw -e -B --no-transfer-progress --settings .github/release-settings.xml \
-Dnjord.autoPublish \
-DskipTests -DskipITs -Dno-format -Dinvoker.skip=true \
-Dno-test-modules \
-Ddeploy-gradle-plugins \
-Ddevelocity.cache.local.enabled=false \
-Ddevelocity.cache.remote.enabled=false \
-Ddokka \
-Prelocations,snapshots \
clean deploy
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -r ~/.m2/repository/io/quarkus
- name: Report status
if: always()
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 12111
quarkus-sha: ${{ steps.quarkus-sha.outputs.sha }}
project-sha: ${{ steps.quarkus-sha.outputs.sha }}