Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ghcr runner
Browse files Browse the repository at this point in the history
chrispinkney committed Nov 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 22469ac commit 698f899
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: Docker Release

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
@@ -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 698f899

Please sign in to comment.