You've already forked caddy-bunny
Initial commit
Some checks failed
Build container image / Build and push image (push) Failing after 2m8s
Some checks failed
Build container image / Build and push image (push) Failing after 2m8s
This commit is contained in:
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
# Stop the editor from looking for .editorconfig files in the parent directories
|
||||
root = true
|
||||
|
||||
[*]
|
||||
# Non-configurable Prettier behaviors
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
# Caveat: Prettier won't trim trailing whitespace inside template strings, but your editor might.
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# Configurable Prettier behaviors
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 80
|
||||
96
.gitea/workflows/build.yaml
Normal file
96
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
name: Build container image
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
#schedule:
|
||||
# - cron: "05 4 */3 * *" # 4:05am every three days.
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY_USER: ${{ github.repository_owner }}
|
||||
REPO_URL: https://davejansen.dev/${{ github.repository_owner }}/${{
|
||||
github.event.repository.name }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{
|
||||
inputs.brand_name}}-${{ inputs.stream_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_push:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
# Lowercase the image uri
|
||||
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
|
||||
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: |
|
||||
# This generates a timestamp like what is defined on the ArtifactHub documentation
|
||||
# E.G: 2022-02-08T15:38:15Z'
|
||||
# https://artifacthub.io/docs/topics/repositories/container-images/
|
||||
# https://linux.die.net/man/1/date
|
||||
echo "date=$(date -u +%Y\-%m\-%d\T%H\:%M\:%S\Z)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push image
|
||||
id: build_image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: davejansen/caddy-bunny:latest
|
||||
|
||||
#
|
||||
# # This section is optional and only needs to be enabled if you plan on distributing
|
||||
# # your project for others to consume. You will need to create a public and private key
|
||||
# # using Cosign and save the private key as a repository secret in Github for this workflow
|
||||
# # to consume. For more details, review the image signing section of the README.
|
||||
# - name: Install Cosign
|
||||
# uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3.10.0
|
||||
# if: github.event_name != 'pull_request' && github.ref ==
|
||||
# format('refs/heads/{0}', github.event.repository.default_branch)
|
||||
#
|
||||
# - name: Sign container image
|
||||
# if: github.event_name != 'pull_request' && github.ref ==
|
||||
# format('refs/heads/{0}', github.event.repository.default_branch)
|
||||
# env:
|
||||
# IMAGE_FULL:
|
||||
# ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME
|
||||
# }}
|
||||
# TAGS: ${{ steps.push.outputs.digest }}
|
||||
# COSIGN_EXPERIMENTAL: false
|
||||
# COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
|
||||
# COSIGN_PASSWORD: ""
|
||||
# run: |
|
||||
# for tag in ${{ steps.metadata.outputs.tags }}; do
|
||||
# cosign sign -y --key env://COSIGN_PRIVATE_KEY $IMAGE_FULL:$tag
|
||||
# done
|
||||
8
.markdownlint.json
Normal file
8
.markdownlint.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"line-length": {
|
||||
"tables": false
|
||||
},
|
||||
"no-inline-html": {
|
||||
"allowed_elements": ["abbr", "pre", "kbd", "samp"]
|
||||
}
|
||||
}
|
||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
ARG CADDY_VERSION=2
|
||||
|
||||
FROM caddy:$CADDY_VERSION-builder-alpine AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/bunny
|
||||
|
||||
FROM caddy:$CADDY_VERSION-alpine
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
Reference in New Issue
Block a user