mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 11:49:25 +00:00
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'README*'
|
|
- 'LICENSE*'
|
|
- 'shell.nix*'
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'README*'
|
|
- 'LICENSE*'
|
|
- 'shell.nix*'
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: false
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '17'
|
|
cache: maven
|
|
|
|
- name: Build and test
|
|
run: mvn -B verify
|
|
|
|
docker:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Docker Hub
|
|
if: github.event_name == 'push' || github.event_name == 'release'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: kruhlmann
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
- name: Build & push latest
|
|
if: github.event_name == 'push'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: kruhlmann/imgfloat:latest
|
|
|
|
- name: Build & push release tag
|
|
if: github.event_name == 'release'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: kruhlmann/imgfloat:${{ github.event.release.tag_name }}
|