mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 07:57:55 +02:00
chore: Create final docker image only on tag creation
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
name: Docker image
|
name: Docker image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
tags:
|
||||||
|
- '*'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -30,7 +31,7 @@ jobs:
|
|||||||
gradle-version: 8.5
|
gradle-version: 8.5
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
- name: Create and publish docker image
|
- name: Create and publish docker image
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push'
|
||||||
run: ./gradlew -Prelease.useLastTag=true final jib
|
run: ./gradlew -Prelease.useLastTag=true final jib
|
||||||
env:
|
env:
|
||||||
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
|||||||
Reference in New Issue
Block a user