Quarkus Deploy Snapshots #1301
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: Quarkus Deploy Snapshots | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
env: | |
LANG: en_US.UTF-8 | |
jobs: | |
build-and-deploy: | |
name: "Build and deploy" | |
runs-on: ubuntu-latest | |
if: github.repository == 'quarkusio/quarkus' | |
env: | |
MAVEN_OPTS: -Xmx2048m -XX:MaxMetaspaceSize=1000m | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Reclaim Disk Space | |
run: .github/ci-prerequisites.sh | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
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@v4 | |
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_API_TOKEN }} | |
SERVER_USERNAME: ${{ secrets.SERVER_USERNAME }} | |
SERVER_PASSWORD: ${{ secrets.SERVER_PASSWORD }} | |
run: | | |
./mvnw -e -B --settings .github/mvn-settings.xml \ | |
-DskipTests -DskipITs -Dno-format -Dinvoker.skip=true \ | |
-DretryFailedDeploymentCount=10 \ | |
-Dno-test-modules \ | |
-Dgradle.cache.local.enabled=false \ | |
-Ddokka \ | |
-Prelocations \ | |
clean deploy | |
- name: Delete Local Artifacts From Cache | |
shell: bash | |
run: rm -r ~/.m2/repository/io/quarkus | |
- name: Report | |
if: always() | |
shell: bash | |
run: | | |
curl -Ls https://sh.jbang.dev | bash -s - app setup | |
~/.jbang/bin/jbang .github/NativeBuildReport.java \ | |
issueNumber=12111 \ | |
runId=${{ github.run_id }} \ | |
status=${{ job.status }} \ | |
token=${{ secrets.GITHUB_API_TOKEN }} \ | |
issueRepo=${{ github.repository }} \ | |
thisRepo=${{ github.repository }} |