Skip to content

Commit 2222a87

Browse files
Adds build workflow
1 parent 5be7f38 commit 2222a87

5 files changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docker Build
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
env:
8+
DOCKER_APP_REPOSITORY: ghcr.io/${{ github.repository }}
9+
10+
jobs:
11+
debug:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Debug environment
15+
run: env | sort
16+
17+
build:
18+
needs:
19+
- debug
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v6
33+
with:
34+
push: false
35+
tags: |
36+
${DOCKER_APP_REPOSITORY}:run-${github.run_id}_${github.run_attempt}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_STORE

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM hello-world

bin/test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh -e
2+
3+
docker compose up --build --exit-code-from app

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
services:
4+
app:
5+
build: .
6+
image: ${DOCKER_APP_IMAGE}

0 commit comments

Comments
 (0)