Skip to content

Make cache not-read-only #27

Make cache not-read-only

Make cache not-read-only #27

Workflow file for this run

name: Kotlin CI with Gradle
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Build with Gradle Wrapper
run: ./gradlew build
env:
GH_USER: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish distribution
run: ./gradlew publish
env:
GPR_USER: ${{ github.actor }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REF: ${{ github.ref }}
- name: Log in to Docker registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Publish container images
run: ./gradlew jib --image=ghcr.io/home-former:${{ github.sha }}