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
|
name: Publish Docker image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: main
|
branches:
|
||||||
tags:
|
- main
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
name: Push Docker image to GitHub Packages
|
name: Push Docker image to Forgejo Packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/wbrawner/caddy-porkbun
|
git.wbrawner.com/wbrawner/caddy-porkbun
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule
|
type=schedule
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
|
@ -26,16 +25,20 @@ jobs:
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=sha
|
type=sha
|
||||||
|
- name: Set up Docker context
|
||||||
|
run: docker context create builders
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
endpoint: builders
|
||||||
|
- name: Login to Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.wbrawner.com
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
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
|
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
|
LABEL org.opencontainers.image.source=https://github.com/wbrawner/caddy-porkbun
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|
Loading…
Reference in a new issue