Skip to content

Commit 2377e81

Browse files
authored
Initial commit
1 parent 0aec8f6 commit 2377e81

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/action.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
19+
20+
- name: Log in to GHCR
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and Push Docker Image
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
file: ./Dockerfile
32+
push: true
33+
tags: ghcr.io/${{ github.repository }}/dnsmasq:latest

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM debian:latest
2+
3+
RUN apt-get update && \
4+
apt-get install -y dnsmasq && \
5+
apt-get clean && \
6+
rm -rf /var/lib/apt/lists/*
7+
8+
CMD ["dnsmasq", "--no-daemon", "-C", "/etc/dnsmasq.conf"]

0 commit comments

Comments
 (0)