Update build process to use forgejo
All checks were successful
Publish Docker image / Push Docker image to Forgejo Packages (push) Successful in 18m54s
All checks were successful
Publish Docker image / Push Docker image to Forgejo Packages (push) Successful in 18m54s
This commit is contained in:
parent
0379540a72
commit
d2fbc5f113
2 changed files with 18 additions and 15 deletions
|
@ -1,23 +1,22 @@
|
|||
name: Publish Docker image
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to GitHub Packages
|
||||
name: Push Docker image to Forgejo Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/wbrawner/caddy-porkbun
|
||||
git.wbrawner.com/wbrawner/caddy-porkbun
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
|
@ -26,16 +25,20 @@ jobs:
|
|||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
- name: Set up Docker context
|
||||
run: docker context create builders
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
endpoint: builders
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.wbrawner.com
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
|
@ -1,8 +1,8 @@
|
|||
FROM caddy:2-builder-alpine AS builder
|
||||
FROM docker.io/caddy:2-builder-alpine AS builder
|
||||
|
||||
RUN xcaddy build --with github.com/caddy-dns/porkbun@v0.2.1
|
||||
|
||||
FROM caddy:2-alpine
|
||||
FROM docker.io/caddy:2-alpine
|
||||
LABEL org.opencontainers.image.source=https://github.com/wbrawner/caddy-porkbun
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
|
Loading…
Reference in a new issue