Skip to content

Commit

Permalink
Check protected production CI
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-bessei committed Oct 4, 2024
1 parent 7ff1970 commit 3f6f8dd
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/production_publish-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 3f6f8dd

Please sign in to comment.