Skip to content

Commit

Permalink
Add docker bake file, and build action
Browse files Browse the repository at this point in the history
  • Loading branch information
zachauten committed Sep 24, 2024
1 parent 03c2a4a commit 305a424
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build OCI image
on: push
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
with:
images: |
${{ github.repository_owner }}/${{ github.repository }}
ghcr.io/${{ github.repository }}
- uses: docker/bake-action@v5
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
push: true
8 changes: 8 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
target "docker-metadata-action" {}

target "default" {
inherits = ["docker-metadata-action"]
context = "."
dockerfile = "Dockerfile"
tags = ["spring-boilerplate:latest"]
}

0 comments on commit 305a424

Please sign in to comment.