-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage_container_operations.yml
More file actions
67 lines (64 loc) · 2.19 KB
/
storage_container_operations.yml
File metadata and controls
67 lines (64 loc) · 2.19 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: azure storage container operations
on:
workflow_dispatch:
inputs:
keyvault_name:
description: 'The Azure Key Vault to use'
type: string
storage_account:
required: true
type: string
description: 'azure storage account name'
action:
description: 'action to be performed on storage account'
required: true
type: choice
options:
- create_container
- delete_container
- list_containers
- recover_container
- recover_all_deleted_containers
- copy_data_from_one_container_to_another
secret_name:
required: true
description: 'secret name of storage account key configured in key vault'
type: string
time_limit_of_sas_token:
required: true
default: 1
type: number
container_name:
type: string
default: "''"
required: true
description: 'Container Name (required only for create/delete/recover actions). Else leave as it is'
jobs:
storage-container-operations:
runs-on: ubuntu-latest
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v2
with:
python-version : '3.11'
- name: package installations
run: |
pip install pipenv
pipenv install
pipenv graph
- name : run python program
run: |
pipenv run python3 storage_containers.py --keyvault_name ${{ github.event.inputs.keyvault_name }} \
--secret_name ${{ github.event.inputs.secret_name }} \
--time_limit_of_sas_token ${{ github.event.inputs.time_limit_of_sas_token }} \
--storage_account ${{ github.event.inputs.storage_account }} \
--action ${{ github.event.inputs.action }} \
--container_name ${{ github.event.inputs.container_name }}
- name: program execution completed
run: echo "program execution completed"