Skip to content

Commit

Permalink
Merge pull request #39 from hibare/dev
Browse files Browse the repository at this point in the history
Bump Deps + Bump caddy from 2.7.4-alpine to 2.7.5-alpine + merge release & test workflow
  • Loading branch information
hibare committed Oct 17, 2023
2 parents f72a319 + 5fca656 commit d1aba12
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 78 deletions.
68 changes: 0 additions & 68 deletions .github/workflows/docker-image-test.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish docker image
name: Test & Release Publish

# When its time to do a release do a full cross platform build for all supported
# architectures and push all of them to Docker Hub and GitHub Container Registry.
Expand All @@ -8,16 +8,25 @@ on:
tags:
- "*"

pull_request:
branches:
- "main"
- "dev"
paths-ignore:
- "**/README.md"
- "**/.github"

jobs:
dockerhub-publish:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
Expand All @@ -28,13 +37,13 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
Expand All @@ -46,21 +55,22 @@ jobs:
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM caddy:2.7.4-builder-alpine AS builder
FROM caddy:2.7.5-builder-alpine AS builder

RUN xcaddy build \
--with github.com/caddy-dns/cloudflare


FROM caddy:2.7.4-alpine
FROM caddy:2.7.5-alpine

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

0 comments on commit d1aba12

Please sign in to comment.