generated from arundo/github-actions-deploy-pod-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (37 loc) · 1.31 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build and push docker image Azure registry
description: This builds a docker image and pushes it to an Azure registry
inputs:
# Note that the below two have default values that should be Arundo-wide
environment:
description: Arundo environment, one of develop, stage, us, emea
required: true
product:
description: Arundo product name
required: true
registry:
description: Docker image registry name at Azure
required: true
service:
description: Name of the service, typically also the Kubernetes deployment
required: true
sha-tag:
description: Commit tag
required: true
runs:
using: "composite"
steps:
- name: Build and push to registry
shell: bash
run: |
docker build -t $registryPath/$product/$service:$sha_tag .
docker tag $registryPath/$product/$service:$sha_tag $registryPath/$product/$service:$environment
az acr login --name $registry
docker push $registryPath/$product/$service:$sha_tag
docker push $registryPath/$product/$service:$environment
env:
environment: ${{ inputs.environment }}
registry: ${{ inputs.registry }}
registryPath: ${{ inputs.registry }}.azurecr.io
product: ${{ inputs.product }}
service: ${{ inputs.service }}
sha_tag: ${{ inputs.sha-tag }}