planetiler/.github/workflows/snapshot.yml

52 wiersze
1.7 KiB
YAML

# This workflow builds a map using the base and branch commit of a PR and uploads
# the logs as an artifact that update-pr.yml uses to add back as a comment.
name: Publish a Snapshot
on:
workflow_dispatch:
inputs:
image_tags:
description: 'Extra docker image tags ("latest,test")'
required: true
default: 'latest,snapshot'
jobs:
snapshot:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Cache data/sources
uses: ./.github/cache-sources-action
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- run: ./scripts/build-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
run: |
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
- run: ./scripts/push-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}