-
Notifications
You must be signed in to change notification settings - Fork 129
124 lines (109 loc) · 4.37 KB
/
snapshot-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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