Skip to content

Commit

Permalink
feat: add ghcr runner
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispinkney committed Nov 5, 2024
1 parent 22469ac commit 5da12a7
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build & Push to GHCR

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build -t ghcr.io/timberware/woodpecker:latest -f deployments/Dockerfile .
- name: Push image
run: |
docker push ghcr.io/timberware/woodpecker:latest
42 changes: 42 additions & 0 deletions .github/workflows/format-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Format and Lint

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22']

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Build
run: go build -v -o woodpecker ./cmd/woodpecker

format:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22']

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Format
run: go fmt ./...
4 changes: 4 additions & 0 deletions deployments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ WORKDIR /app

COPY --from=builder /app/woodpecker .

LABEL org.opencontainers.image.source="https://github.com/timberware/woodpecker"
LABEL org.opencontainers.image.description="woodpecker is an app that automatically updates DNS A records for a specified domain and subdomain hosted by Namecheap and/or PorkBun"
LABEL org.opencontainers.image.licenses=GNUGPLv3

CMD ["./woodpecker"]

0 comments on commit 5da12a7

Please sign in to comment.