Publish docker images #3390
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
# Copyright 2021 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Publish docker images | |
on: | |
schedule: | |
- cron: '0 0 * * *' # each 12:00 UTC | |
push: | |
branches: [ main ] | |
tags: [ 'v*.*.*' ] # semver release | |
pull_request: | |
branches: [ main ] | |
env: | |
REGISTRY: ghcr.io | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
DOCKER_REPOSITORY_OWNER: ${{github.repository_owner}} | |
jobs: | |
build-registry-server: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: ./.github/workflows/composite/build-push | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.USERNAME }} | |
password: ${{ env.PASSWORD }} | |
image: ${{ env.DOCKER_REPOSITORY_OWNER }}/registry-server | |
context: . | |
file: containers/registry-server/Dockerfile | |
build-registry-tools: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: ./.github/workflows/composite/build-push | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.USERNAME }} | |
password: ${{ env.PASSWORD }} | |
image: ${{ env.DOCKER_REPOSITORY_OWNER }}/registry-tools | |
context: . | |
file: containers/registry-tools/Dockerfile | |
build-registry-envoy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: ./.github/workflows/composite/build-push | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.USERNAME }} | |
password: ${{ env.PASSWORD }} | |
image: ${{ env.DOCKER_REPOSITORY_OWNER }}/registry-envoy | |
context: . | |
file: deployments/envoy/Dockerfile |