Skip to content

Publish in-development builds from main #1138

Publish in-development builds from main

Publish in-development builds from main #1138

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-22.04
timeout-minutes: 240
env:
SPARK_LOCAL_IP: localhost
if: github.repository == 'projectnessie/nessie'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@d156388eb19639ec20ade50009f3d199ce1e2808 # v4
with:
cache-disabled: true
validate-wrappers: false
- name: List projects
run: ./gradlew 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 compileAll jar || \
./gradlew compileAll jar || \
./gradlew compileAll jar
# 2 Retries - due to Gradle's old and unfixed CME bug
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar || \
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar || \
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Prelease -Puber-jar
publish-images:
name: Publish Images
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
SPARK_LOCAL_IP: localhost
if: github.repository == 'projectnessie/nessie'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@d156388eb19639ec20ade50009f3d199ce1e2808 # v4
with:
cache-disabled: true
validate-wrappers: false
- name: List projects
run: ./gradlew 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 compileAll jar || \
./gradlew compileAll jar || \
./gradlew 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