Skip to content

Update docs on live reload #42

Update docs on live reload

Update docs on live reload #42

Workflow file for this run

name: Commit Stage
on: push
env:
REGISTRY: ghcr.io
IMAGE_NAME: thomasvitale/devex/book-service
VERSION: latest
jobs:
build:
name: Build and Test
runs-on: ubuntu-22.04
permissions:
contents: read
security-events: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: liberica
cache: gradle
- name: Build, unit tests and integration tests
run: |
cd 06-knative/basic/book-service
chmod +x gradlew
./gradlew build
package:
name: Package and Publish
if: ${{ github.ref == 'refs/heads/main' }}
needs: [ build ]
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
security-events: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: liberica
cache: gradle
- name: Build container image
run: |
cd 06-knative/basic/book-service
chmod +x gradlew
./gradlew bootBuildImage \
--imageName ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
- name: Authenticate with the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.IMAGE_PUSH_TOKEN }}
- name: Publish container image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}