Update docker images (production) #51
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: "Update docker images (production)" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "41 9 * * *" | |
jobs: | |
# Republish the default caddy:2-alpine docker image on Quay.io | |
v2-alpine: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: "Login to ${{ vars.CI_REGISTRY }}" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- name: "Pull from Docker Hub and republish on Quay.io" | |
run: | | |
docker pull caddy:2-alpine | |
docker tag caddy:2-alpine ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine | |
docker push ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine | |
# Build a custom Caddy docker image with the modules listed below & push it to Quay.io | |
# * dns.providers.cloudflare: https://github.com/caddy-dns/cloudflare | |
v2-alpine_cloudflare: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: "Login to ${{ vars.CI_REGISTRY }}" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
file: images/v2-alpine_cloudflare/Dockerfile | |
push: true | |
tags: ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine_cloudflare | |
# Build a custom Caddy docker image with the modules listed below & push it to Quay.io | |
# * http.handlers.rate_limit: https://github.com/mholt/caddy-ratelimit | |
v2-alpine_rate-limit: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: "Login to ${{ vars.CI_REGISTRY }}" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
file: images/v2-alpine_rate-limit/Dockerfile | |
push: true | |
tags: ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine_rate-limit | |
# Build a custom Caddy docker image with the modules listed below & push it to Quay.io | |
# * dns.providers.cloudflare: https://github.com/caddy-dns/cloudflare | |
# * http.handlers.rate_limit: https://github.com/mholt/caddy-ratelimit | |
v2-alpine_cloudflare_rate-limit: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: "Login to ${{ vars.CI_REGISTRY }}" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
file: images/v2-alpine_cloudflare_rate-limit/Dockerfile | |
push: true | |
tags: ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine_cloudflare_rate-limit |