Skip to content

build and publish dockerfile #50

build and publish dockerfile

build and publish dockerfile #50

Workflow file for this run

name: build and publish dockerfile
on:
push:
branches: ["main"]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- name: Build with gradle
run: ./gradlew clean bootJar
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
ghcr.io/stevensblueprint/blueprint_admin_backend:${{ github.sha }}
ghcr.io/stevensblueprint/blueprint_admin_backend:latest