Skip to content

Commit cddc896

Browse files
Merge pull request #1 from jae1911/jae-cicd-builds
CICD for Docker builds
2 parents d92cd68 + c926124 commit cddc896

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/docker.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
docker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v3
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Extract metadata (tags, labels) for Docker
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: ghcr.io/${{ github.repository }}
24+
25+
- name: Login to GHCR
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and push
33+
uses: docker/build-push-action@v6
34+
with:
35+
context: .
36+
push: true
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)