Skip to content

Publish in-development builds from main #1274

Publish in-development builds from main

Publish in-development builds from main #1274

name: Publish in-development builds from main
on:
schedule:
# Run daily on week days
- cron: '0 11,23 * * 1-5'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
publish-to-maven:
name: Publish to Maven Central
runs-on: ubuntu-24.04
timeout-minutes: 240
env:
SPARK_LOCAL_IP: localhost
if: github.repository == 'projectnessie/nessie'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Setup runner
uses: ./.github/actions/setup-runner
- name: Setup Java, Gradle
uses: ./.github/actions/dev-tool-java
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4
with:
cache-disabled: true
validate-wrappers: false
- name: List projects
run: ./gradlew --no-scan projects
- name: Gradle / publish snapshot
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_ACCESS_ID }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
run: |
# 2 Retries - due to Gradle's old and unfixed CME bug
./gradlew --no-scan compileAll jar || \
./gradlew --no-scan compileAll jar || \
./gradlew --no-scan compileAll jar
# 2 Retries - due to Gradle's old and unfixed CME bug
./gradlew --no-scan publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar || \
./gradlew --no-scan publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar || \
./gradlew --no-scan publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar
publish-images:
name: Publish Images
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
SPARK_LOCAL_IP: localhost
if: github.repository == 'projectnessie/nessie'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Setup runner
uses: ./.github/actions/setup-runner
- name: Setup Java, Gradle
uses: ./.github/actions/dev-tool-java
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4
with:
cache-disabled: true
validate-wrappers: false
- name: List projects
run: ./gradlew --no-scan projects
- name: Gradle / build
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: |
# 2 Retries - due to Gradle's old and unfixed CME bug
./gradlew --no-scan compileAll jar || \
./gradlew --no-scan compileAll jar || \
./gradlew --no-scan compileAll jar
- name: Docker images publishing
run: |
echo '${{ secrets.GITHUB_TOKEN }}' | docker login ghcr.io -u $ --password-stdin
tools/dockerbuild/build-push-images.sh \
-g ":nessie-quarkus" \
-p "servers/quarkus-server" \
ghcr.io/projectnessie/nessie-unstable
tools/dockerbuild/build-push-images.sh \
-g ":nessie-gc-tool" \
-p "gc/gc-tool" \
-d "Dockerfile-gctool" \
ghcr.io/projectnessie/nessie-gc-unstable
tools/dockerbuild/build-push-images.sh \
-g ":nessie-server-admin-tool" \
-p "tools/server-admin" \
-d "Dockerfile-admintool" \
ghcr.io/projectnessie/nessie-server-admin-unstable
tools/dockerbuild/build-push-images.sh \
-g ":nessie-cli" \
-p "cli/cli" \
-d "Dockerfile-cli" \
ghcr.io/projectnessie/nessie-cli-unstable
# NOTE: GH container registry behaves a bit weird when new images are added.
# The first push/publication of a _new_ image (package) fails with a HTTP/403,
# but the next one works.
# See also the note in .github/docker-sync/regsync.yml about quay.io.
#
# Also make sure to add the new image to the site, currently in:
# site/docs/downloads/index.md
# site/in-dev/index.md
# site/in-dev/index-release.md