diff --git a/.github/workflows/upload_release.yaml b/.github/workflows/upload_release.yaml index 2d1b219..5854caf 100644 --- a/.github/workflows/upload_release.yaml +++ b/.github/workflows/upload_release.yaml @@ -2,7 +2,7 @@ name: Upload Release on: release: - types: published + types: [published] jobs: upload: @@ -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/setup-buildx-action@v2.5.0 + - name: Lowercase repository name + run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.6.1 + 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/build-push-action@v6.12.0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/rpm/rpm.pom.xml b/rpm/rpm.pom.xml index 7ce9c39..5fc2032 100644 --- a/rpm/rpm.pom.xml +++ b/rpm/rpm.pom.xml @@ -103,7 +103,7 @@ - java-1.8.0-openjdk + java-1.8.0-openjdk-headless