-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.47 KB
/
production_publish-image.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Update docker images (production)"
on:
workflow_dispatch:
push:
branches:
- main
- feature/preview-images
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-debug
docker push ${{ vars.CI_REGISTRY_IMAGE }}:v2-alpine-debug
# Build a customer Caddy docker image with Cloudflare DNS support and push it to Quay.io
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-debug