Skip to content

Commit

Permalink
Initial import (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 authored Dec 8, 2024
1 parent ab57211 commit 391ca95
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build

on:
pull_request:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/setup-buildx-action@v3
- uses: docker/bake-action@v5
with:
files: |
./docker-bake.hcl
${{ steps.metadata.outputs.bake-file }}
22 changes: 22 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
group "default" {
targets = [
"service1",
"service2",
]
}

target "docker-metadata-action" {
output = ["type=registry"]
}

target "service1" {
inherits = ["docker-metadata-action"]
context = "."
dockerfile = "service1.dockerfile"
}

target "service2" {
inherits = ["docker-metadata-action"]
context = "."
dockerfile = "service2.dockerfile"
}
2 changes: 2 additions & 0 deletions service1.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM debian:12-slim
RUN echo service1 > /service-name
2 changes: 2 additions & 0 deletions service2.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM debian:12-slim
RUN echo service2 > /service-name

0 comments on commit 391ca95

Please sign in to comment.