Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josiahsiegel/disable-azure-function
https://github.com/josiahsiegel/disable-azure-function
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/josiahsiegel/disable-azure-function
- Owner: JosiahSiegel
- Created: 2022-05-02T21:15:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-02T21:42:02.000Z (over 2 years ago)
- Last Synced: 2024-10-31T10:42:28.717Z (15 days ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Disable Azure Function
![](https://badgen.net/badge/icon/gitguardian/green?icon=gitguardian&label)
[![Linux runner](https://github.com/JosiahSiegel/disable-azure-function/actions/workflows/test_linux_runner.yml/badge.svg)](https://github.com/JosiahSiegel/disable-azure-function/actions/workflows/test_linux_runner.yml)
[![Windows runner](https://github.com/JosiahSiegel/disable-azure-function/actions/workflows/test_windows_runner.yml/badge.svg)](https://github.com/JosiahSiegel/disable-azure-function/actions/workflows/test_windows_runner.yml)## Synopsis
Disable or enable a function within an Azure Function App.
## Inputs
```yml
inputs:
function-app-name:
description: "Function app name"
required: true
resource-group-name:
description: "Resource group name"
required: true
function-name:
description: "Function name"
required: true
disable:
description: "Disable function: true/false"
required: true
```## Quick start
`sample_workflow.yml`
```yml
jobs:
set_functions:
runs-on: ubuntu-latest
outputs:
functions: "[\"batch\",\"send\"]"
steps:
- name: Check out repository
uses: actions/checkout@v2
run_local_action:
runs-on: ubuntu-latest
needs:
- set_functions
strategy:
matrix:
function: ${{ fromJson(needs.set_functions.outputs.functions) }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.SERVICE_PRINCIPAL_CREDS }}
- name: Disable function
uses: JosiahSiegel/disable-azure-function@v1
with:
function-app-name: ${{ secrets.TEST_FUNCTION_APP }}
resource-group-name: ${{ secrets.TEST_RG }}
function-name: ${{ matrix.function }}
disable: true
```