Skip to content

Commit 125a79b

Browse files
authored
Merge pull request #1 from ebox86/feat/workflow
feat: updated readme, added build wf
2 parents 2ade27f + b060954 commit 125a79b

2 files changed

Lines changed: 60 additions & 1 deletion

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build and publish hello container
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: hello
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: npm
28+
29+
- name: Install deps
30+
run: npm ci
31+
32+
- name: Build
33+
run: npm run build
34+
35+
- name: Log in to GHCR
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.repository_owner }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Extract metadata (tags, labels)
43+
id: meta
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: |
47+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
48+
tags: |
49+
type=raw,value=latest
50+
type=sha
51+
52+
- name: Build and push image
53+
uses: docker/build-push-action@v6
54+
with:
55+
context: .
56+
push: true
57+
tags: ${{ steps.meta.outputs.tags }}
58+
labels: ${{ steps.meta.outputs.labels }}
59+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Tiny Next.js “hello” container for smoke tests and IaC placeholders.
44

5-
![Screenshot](/screenshot.png)
5+
![Screenshot](/public/screenshot.png)
66

77
- Big `hello 👋` in the center
88
- Light/dark toggle

0 commit comments

Comments
 (0)