GitHub Action to deploy and delete one-off Azure Container Instances.
Intended for short-living Linux container workloads in private Azure network.
GitHub runner must have bash
and az
installed (GitHub hosted runners do).
Use azure/login action in pipeline to login to Azure before using this action.
Required arguments:
action: deploy
subscription
- name, resource group must existrg
- name or id, subscription must exist
Optional arguments:
file
- Container group yaml file. Overrides all the optional arguments.location
- e.g.westeurope
, get name fromaz account list-locations
aci
- name, target to deploy/deleteimage
- fqdn/repository:tagvnet
- name or id - created if does not exist, useaz_args
to set CIDRsubnet
- name or id - created if does not exist, useaz_args
to set CIDRenv_variables
- space-separated list (NAME=${{ vars.NAME }} VAR=value
)env_secrets
- space-separated list (SUM=${{ secrets.SUM }} ANOTHER=...
)cpus
- defaults to 1 CPU corememory_gbs
- defaults to 1.5GBrestart_policy
- defaults to Alwayslaw
- existing Log Analytics Workspace name or idlaw_key
- Log Analytics Workspace primary or secondary keycommand
- Command to run. String. Overrides DockerfileENTRYPOINT
andCMD
.az_args
- Azure CLI arguments. May extend or override previous arguments.
See az container create --help
for detailed description on arguments.
Example:
uses: alkue-com/[email protected]
with:
action: deploy
subscription: ${{ vars.SUBSCRIPTION }}
location: ${{ vars.LOCATION }}
rg: ${{ vars.RG }}
aci: ${{ vars.ACI }}
image: fqdn/repository:tag
vnet: ${{ vars.VNET }}
subnet: ${{ vars.SUBNET }}
Required arguments:
action: delete
subscription
rg
aci
Optional arguments:
az_args
- any Azure CLI arguments (may extend or override previous)
See az container delete --help
for detailed description on arguments.
Example:
uses: alkue-com/[email protected]
with:
action: delete
subscription: ${{ vars.SUBSCRIPTION }}
rg: ${{ vars.RG }}
aci: ${{ vars.ACI }}