mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-01 04:20:39 +00:00
## Problem We've got 2 non-blocking failures on the release pipeline: - `promote-compatibility-data` job got skipped _presumably_ because one of the dependencies of `deploy` job (`push-to-acr-dev`) got skipped (https://github.com/neondatabase/neon/pull/8940) - `coverage-report` job fails because we don't build debug artifacts in the release branch (https://github.com/neondatabase/neon/pull/8561) ## Summary of changes - Always run `push-to-acr-dev` / `push-to-acr-prod` jobs, but add `skip_if` parameter to the reusable workflow, which can skip the job internally, without skipping externally - Do not run `coverage-report` on release branches
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Push images to ACR
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
client_id:
|
|
description: Client ID of Azure managed identity or Entra app
|
|
required: true
|
|
type: string
|
|
image_tag:
|
|
description: Tag for the container image
|
|
required: true
|
|
type: string
|
|
images:
|
|
description: Images to push
|
|
required: true
|
|
type: string
|
|
registry_name:
|
|
description: Name of the container registry
|
|
required: true
|
|
type: string
|
|
subscription_id:
|
|
description: Azure subscription ID
|
|
required: true
|
|
type: string
|
|
tenant_id:
|
|
description: Azure tenant ID
|
|
required: true
|
|
type: string
|
|
skip_if:
|
|
description: Skip the job if this expression is true
|
|
required: true
|
|
type: boolean
|
|
|
|
jobs:
|
|
push-to-acr:
|
|
if: ${{ !inputs.skip_if }}
|
|
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read # This is required for actions/checkout
|
|
id-token: write # This is required for Azure Login to work.
|
|
|
|
steps:
|
|
- name: Azure login
|
|
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # @v2.1.1
|
|
with:
|
|
client-id: ${{ inputs.client_id }}
|
|
subscription-id: ${{ inputs.subscription_id }}
|
|
tenant-id: ${{ inputs.tenant_id }}
|
|
|
|
- name: Login to ACR
|
|
run: |
|
|
az acr login --name=${{ inputs.registry_name }}
|
|
|
|
- name: Copy docker images to ACR ${{ inputs.registry_name }}
|
|
run: |
|
|
images='${{ inputs.images }}'
|
|
for image in ${images}; do
|
|
docker buildx imagetools create \
|
|
-t ${{ inputs.registry_name }}.azurecr.io/neondatabase/${image}:${{ inputs.image_tag }} \
|
|
neondatabase/${image}:${{ inputs.image_tag }}
|
|
done
|