Update ci

This commit is contained in:
2025-09-07 19:58:47 +03:00
parent d5ca50b593
commit d1d32fd5ef

View File

@@ -19,6 +19,13 @@ jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v4
@@ -32,11 +39,16 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
tags: ghcr.io/${{ github.repository_owner }}/memevizor:latest tags: ghcr.io/${{ github.repository_owner }}/memevizor:latest
cache-from: type=gha
cache-to: type=gha,mode=max