Skip to content

2.0.5

2.0.5 #6

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
upload:
name: Upload
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- name: Build jar
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build rpm
run: cd rpm/ && mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach jar and rpm to release
uses: softprops/action-gh-release@v1
with:
files: |
rpm/target/rpm/com.teragrep-pth_05/RPMS/noarch/com.teragrep-pth_05-*.rpm
target/pth_05-jar-with-dependencies.jar
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase repository name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: 'Build Image'
run: |
docker buildx build --output type=docker --tag ghcr.io/${{ env.REPO_LC }}:${{ github.event.release.tag_name }} --tag ghcr.io/${{ env.REPO_LC }}:latest . -f docker/Dockerfile
docker push ghcr.io/${{ env.REPO_LC }} --all-tags