Skip to content

Commit

Permalink
Fixes for container building (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrongestNumber9 authored Jan 20, 2025
1 parent b84d49d commit ec05970
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Upload Release

on:
release:
types: published
types: [published]

jobs:
upload:
Expand Down Expand Up @@ -45,21 +45,26 @@ jobs:
with:
files: target/rpm/com.teragrep-cfe_16/RPMS/noarch/com.teragrep-cfe_16-*.rpm

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Lowercase repository name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ env.REPO_LC }}/app

- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.3.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 }}/app:${{ github.event.release.tag_name }} .
docker push ghcr.io/${{ env.REPO_LC }}/app:${{ github.event.release.tag_name }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion rpm/rpm.pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</mapping>
</mappings>
<requires>
<require>java-1.8.0-openjdk</require>
<require>java-1.8.0-openjdk-headless</require>
</requires>
<preinstallScriptlet>
<script>
Expand Down

0 comments on commit ec05970

Please sign in to comment.