Build the Alpine image and push to GHCR #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the Alpine image and push to GHCR | |
on: | |
push: | |
tags: | |
- 'v*' | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/**.yaml' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and push to ghcr | |
runs-on: ubuntu-latest | |
environment: production | |
permissions: | |
contents: read | |
actions: write | |
defaults: | |
run: | |
working-directory: . | |
shell: bash | |
steps: | |
- name: Free up worker space | |
run: sudo rm -rf "$AGENT_TOOLSDIRECTORY"; sudo rm -rf /usr/share/dotnet /usr/local/lib/android; sudo apt-get update; sudo apt-get remove -y '^dotnet-.*'; sudo apt-get autoremove -y; sudo apt-get clean | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Build & Push Alpine Image to GHCR | |
uses: mr-smithers-excellent/docker-build-push@v6 | |
with: | |
image: qor-caddy | |
registry: ghcr.io | |
dockerfile: caddy-dfs-CC/alpine/Dockerfile | |
buildArgs: BUILDPLATFORM=linux/amd64,CADDY_MODULES="github.com/mholt/caddy-ratelimit github.com/fvbommel/caddy-dns-ip-range github.com/WeidiDeng/caddy-cloudflare-ip github.com/fvbommel/caddy-combine-ip-ranges github.com/caddy-dns/porkbun github.com/corazawaf/coraza-caddy/v2 github.com/caddy-dns/cloudflare github.com/hslatman/caddy-crowdsec-bouncer/http github.com/hslatman/caddy-crowdsec-bouncer/layer4 github.com/hslatman/caddy-crowdsec-bouncer/appsec github.com/caddy-dns/vercel github.com/mholt/caddy-dynamicdns github.com/jonaharagon/caddy-umami",GO_CADDY_VERSION=v2.9.1 | |
tags: alpine-v1.2.18, latest-alpine | |
platform: linux/amd64 | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Cancel on failure | |
uses: andymckay/[email protected] | |
if: failure() | |