Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
perdian committed Feb 5, 2024
1 parent 5b77a48 commit 1c632ab
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ on: [push]

jobs:

build-java:
build-application:
name: Build application
runs-on: ubuntu-latest
environment: dockerhub
permissions:
contents: read
contents: write
checks: write
id-token: write
steps:
Expand All @@ -16,8 +17,9 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Build application
run: |-
mvn --batch-mode clean package
Expand All @@ -33,10 +35,24 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ secrets.DOCKERHUB_USERNAME }}/flightlog:latest
push: ${{ github.ref_type == 'tag' && startsWith(github.action_ref, 'v') }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/flightlog:latest
${{ secrets.DOCKERHUB_USERNAME }}/flightlog:${{ github.action_ref }}
- name: Create Release
if: ${{ github.ref_type == 'tag' && startsWith(github.action_ref, 'v') }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Release automatically created by GitHub Actions
draft: false
prerelease: false

0 comments on commit 1c632ab

Please sign in to comment.