Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
move to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo committed Dec 12, 2022
1 parent 0ce762a commit 6613304
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 17 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
14 changes: 0 additions & 14 deletions .github/workflows/dockerimage.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
---
name: Create and publish a Container image

on:
push:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: resmo/nip-io

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: .
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM bitnami/minideb:latest

RUN install_packages python pdns-server pdns-backend-pipe
ADD src/backend.conf.example /usr/local/bin/backend.conf
ADD src/nip.py /usr/local/bin/nip
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ See https://github.com/resmo/nip.io/blob/master/src/backend.conf.example for an

### As Docker Container


#### Run the Container from DcokerHub:
#### Run the Container from ghcr:

```bash
docker run -d -p 0.0.0.0:53:53/tcp -p 0.0.0.0:53:53/udp -v /data/backend.conf:/usr/local/bin/backend.conf --name nip.io resmo/nip-io
docker run -d -p 0.0.0.0:53:53/tcp -p 0.0.0.0:53:53/udp -v /data/backend.conf:/usr/local/bin/backend.conf --name nip.io ghcr.io/resmo/nip-io
```

#### Or Build the Image:
Expand All @@ -51,6 +50,7 @@ docker logs -f nip.io
```

#### Test it

```bash
dig 1-2-3-4.example.com +short @localhost
1.2.3.4
Expand Down

0 comments on commit 6613304

Please sign in to comment.