fix: config fetcher called twice #1499
Workflow file for this run
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 and Push Docker images | |
on: | |
push: | |
branches: | |
- 'main' | |
tags-ignore: | |
- '**' | |
paths-ignore: | |
- 'docs/*/**' | |
- 'helm/**' | |
- 'scripts/**' | |
pull_request: | |
paths-ignore: | |
- 'docs/*/**' | |
- 'helm/**' | |
- 'scripts/**' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
concurrency: | |
group: ${{github.workflow}}-${{github.head_ref}} | |
cancel-in-progress: false | |
jobs: | |
build-and-push-image: | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
include: | |
- container_name: controlplane | |
dockerfile: controlplane/Dockerfile | |
context_path: . | |
- container_name: router | |
dockerfile: router/Dockerfile | |
context_path: . | |
- container_name: studio | |
dockerfile: studio/Dockerfile | |
context_path: . | |
- container_name: keycloak | |
dockerfile: keycloak/Dockerfile | |
context_path: keycloak | |
- container_name: otelcollector | |
dockerfile: otelcollector/Dockerfile | |
context_path: otelcollector | |
- container_name: graphqlmetrics | |
dockerfile: graphqlmetrics/Dockerfile | |
context_path: graphqlmetrics | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to Github Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container_name }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=sha | |
# set latest tag for default branch | |
type=raw,value=latest,enable={{is_default_branch}} | |
# use custom value instead of git tag | |
type=match,pattern=[a-zA-Z-_]+@(.*),group=1 | |
- name: Install Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# This is a limitation of GitHub. Only organization members can push to GitHub Container Registry | |
# For now, we will disable the push step for Pull Requests | |
- name: Build Docker image (No push) | |
uses: docker/build-push-action@v4 | |
with: | |
push: false | |
file: ${{ matrix.dockerfile }} | |
context: ${{ matrix.context_path }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
VERSION=${{ github.sha }} |