kopia lustrzana https://github.com/onthegomap/planetiler
rodzic
eb72bf1c30
commit
058442188c
|
|
@ -57,12 +57,6 @@ jobs:
|
||||||
- run: mv flatmap-dist/target/*with-deps.jar flatmap.jar
|
- run: mv flatmap-dist/target/*with-deps.jar flatmap.jar
|
||||||
- run: sha256sum flatmap.jar > flatmap.jar.sha256
|
- run: sha256sum flatmap.jar > flatmap.jar.sha256
|
||||||
- run: md5sum flatmap.jar > flatmap.jar.md5
|
- run: md5sum flatmap.jar > flatmap.jar.md5
|
||||||
- name: Log in to the Container Registry
|
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Install GPG Private Key
|
- name: Install GPG Private Key
|
||||||
run: |
|
run: |
|
||||||
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
|
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
|
||||||
|
|
@ -78,6 +72,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: ./scripts/push-release.sh ${{ github.event.inputs.version }}
|
- run: ./scripts/push-release.sh ${{ github.event.inputs.version }}
|
||||||
env:
|
env:
|
||||||
|
GITHUB_ACTOR: ${{ github.actor }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
|
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
|
|
|
||||||
|
|
@ -33,17 +33,12 @@ jobs:
|
||||||
server-password: MAVEN_PASSWORD
|
server-password: MAVEN_PASSWORD
|
||||||
- run: ./scripts/build-release.sh
|
- run: ./scripts/build-release.sh
|
||||||
- run: ./scripts/test-release.sh
|
- run: ./scripts/test-release.sh
|
||||||
- name: Log in to the Container Registry
|
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Install GPG Private Key
|
- name: Install GPG Private Key
|
||||||
run: |
|
run: |
|
||||||
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
|
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
|
||||||
- run: ./scripts/push-release.sh
|
- run: ./scripts/push-release.sh
|
||||||
env:
|
env:
|
||||||
|
GITHUB_ACTOR: ${{ github.actor }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
|
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ target/
|
||||||
*.iml
|
*.iml
|
||||||
!.idea/codeStyles
|
!.idea/codeStyles
|
||||||
!.idea/vcs.xml
|
!.idea/vcs.xml
|
||||||
!.idea/saveactions_settings.xml
|
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="SaveActionSettings">
|
|
||||||
<option name="actions">
|
|
||||||
<set>
|
|
||||||
<option value="activate" />
|
|
||||||
<option value="organizeImports" />
|
|
||||||
<option value="reformat" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
<option name="configurationPath" value="" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -20,6 +20,8 @@ To edit the code:
|
||||||
select: `File -> Invalidate Caches... -> Just Restart`.
|
select: `File -> Invalidate Caches... -> Just Restart`.
|
||||||
- If you see a "Project JDK is not defined" error, then choose `Setup SDK` and point IntelliJ at the Java 16 or later
|
- If you see a "Project JDK is not defined" error, then choose `Setup SDK` and point IntelliJ at the Java 16 or later
|
||||||
installed on your system
|
installed on your system
|
||||||
|
- Recommended: Under `Preferences -> Tools -> Actions on Save` select `Reformat code` and `Optimize imports` to
|
||||||
|
automatically format code on save.
|
||||||
- To verify everything works correctly, right click on `flatmap-core/src/test/java` folder and click `Run 'All Tests'`
|
- To verify everything works correctly, right click on `flatmap-core/src/test/java` folder and click `Run 'All Tests'`
|
||||||
|
|
||||||
Any pull request should:
|
Any pull request should:
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@
|
||||||
<image.version>${project.version}</image.version>
|
<image.version>${project.version}</image.version>
|
||||||
<image>ghcr.io/onthegomap/flatmap:${image.version}</image>
|
<image>ghcr.io/onthegomap/flatmap:${image.version}</image>
|
||||||
<assembly-phase>package</assembly-phase>
|
<assembly-phase>package</assembly-phase>
|
||||||
|
<jib.platform-arch>amd64</jib.platform-arch>
|
||||||
|
<jib.platform-os>linux</jib.platform-os>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
@ -46,10 +48,15 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>false</skip>
|
<skip>false</skip>
|
||||||
<from>
|
<from>
|
||||||
<!-- eclipse-temurin:16-jdk - fixed hash for build reproducibility -->
|
|
||||||
<image>
|
<image>
|
||||||
eclipse-temurin@sha256:e732d05ea997f62908b16ec7b47513ebc56ff74a0b689e9ca5683f911779b40e
|
eclipse-temurin:17-jdk
|
||||||
</image>
|
</image>
|
||||||
|
<platforms>
|
||||||
|
<platform>
|
||||||
|
<architecture>${jib.platform-arch}</architecture>
|
||||||
|
<os>${jib.platform-os}</os>
|
||||||
|
</platform>
|
||||||
|
</platforms>
|
||||||
</from>
|
</from>
|
||||||
<to>
|
<to>
|
||||||
<image>${image}</image>
|
<image>${image}</image>
|
||||||
|
|
@ -121,5 +128,30 @@
|
||||||
<assembly-phase>none</assembly-phase>
|
<assembly-phase>none</assembly-phase>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jib-multi-arch</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.google.cloud.tools</groupId>
|
||||||
|
<artifactId>jib-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<from>
|
||||||
|
<platforms>
|
||||||
|
<platform>
|
||||||
|
<architecture>amd64</architecture>
|
||||||
|
<os>linux</os>
|
||||||
|
</platform>
|
||||||
|
<platform>
|
||||||
|
<architecture>arm64</architecture>
|
||||||
|
<os>linux</os>
|
||||||
|
</platform>
|
||||||
|
</platforms>
|
||||||
|
</from>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ public class Main {
|
||||||
);
|
);
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
// for some reason the container distribution sometimes exits immediately unless this method prints something
|
||||||
|
System.out.println("");
|
||||||
EntryPoint task = DEFAULT_TASK;
|
EntryPoint task = DEFAULT_TASK;
|
||||||
|
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
version="${1:-$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)}"
|
VERSION="${1:-$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)}"
|
||||||
|
|
||||||
docker image push ghcr.io/onthegomap/flatmap:"${version}"
|
TAGS=""
|
||||||
|
if [ -n "${IMAGE_TAGS:-}" ]; then
|
||||||
|
TAGS="-Djib.to.tags=${IMAGE_TAGS// /}"
|
||||||
|
fi
|
||||||
|
|
||||||
TAGS="${IMAGE_TAGS:-}"
|
./mvnw -B -ntp -DskipTests "${TAGS}" -Pjib-multi-arch \
|
||||||
for TAG in ${TAGS//,/ }
|
-Dimage.version="${VERSION}" \
|
||||||
do
|
-Djib.to.auth.username="${GITHUB_ACTOR}" \
|
||||||
echo "Pushing tag ${TAG}"
|
-Djib.to.auth.password="${GITHUB_TOKEN}" \
|
||||||
docker image tag ghcr.io/onthegomap/flatmap:"${version}" ghcr.io/onthegomap/flatmap:"${TAG}"
|
package jib:build --file pom.xml
|
||||||
docker image push ghcr.io/onthegomap/flatmap:"${TAG}"
|
|
||||||
done
|
|
||||||
|
|
||||||
./mvnw -B -Dgpg.passphrase="${OSSRH_GPG_SECRET_KEY_PASSWORD}" -DskipTests -Prelease deploy
|
./mvnw -B -Dgpg.passphrase="${OSSRH_GPG_SECRET_KEY_PASSWORD}" -DskipTests -Prelease deploy
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue