chore(Ktor): remove explicit UptimeMetrics #496
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: push | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Docker Metadata | |
id: docker-metadata | |
uses: docker/metadata-action@v5 | |
with: | |
# won't be used but is required by the action | |
images: dummy | |
tags: | | |
type=semver,pattern={{major}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{version}} | |
type=ref,event=tag | |
type=ref,event=branch | |
type=ref,event=pr | |
- name: Setup gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build docker image | |
id: build-docker-image | |
run: | | |
additional_tags="$(echo "$DOCKER_METADATA_OUTPUT_TAGS" | tr '\n' ' ' | sed 's/dummy://g')" | |
application_version="$(./gradlew properties -q | awk '/^version:/ {print $2}')" | |
# unique version like `2.6.1-69` - immutable | |
full_version="$application_version-DEV.${{github.run_number}}" | |
./gradlew \ | |
-Pme.snoty.docker.tags="$full_version $additional_tags" \ | |
-Pme.snoty.github.run="${{github.run_id}}:${{github.run_number}}" \ | |
build jibDockerBuild | |
- name: Log in to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push docker image | |
run: docker push --all-tags ghcr.io/snotyme/snoty-backend | |
- name: Upload JAR | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: build/libs |