forked from neondatabase/neon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
push images to prod ACR (neondatabase#8940)
Used `vars` for new storing non-sensitive information, changed dev secrets to vars as well but didn't cleanup any secrets. neondatabase/cloud#16925 --------- Co-authored-by: Alexander Bayandin <alexander@neon.tech>
- Loading branch information
Showing
3 changed files
with
89 additions
and
27 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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 | ||
|
||
jobs: | ||
push-to-acr: | ||
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 |
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