publish-local-settings
option would be nice
#252
SeaDude
started this conversation in
Feature asks
Replies: 1 comment
-
While waiting for this functionality to be added to this action, you can use the following workflow to publish using the name: Publish
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run tests
run: pytest --cov --cov-report=term
deploy:
runs-on: ubuntu-latest
needs: test
permissions:
id-token: write # This is required for requesting the JWT
contents: read # Require read permission to clone repo in checkout step. (default permission)
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js version
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Azure Functions Core Tools
run: npm install -g azure-functions-core-tools@4 --unsafe-perm true
- name: Setup Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Login to Azure
uses: azure/login@v2
with:
# user-assigned managed identity's federated identity credential details
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Publish Function App
run: func azure functionapp publish thenameofyourfunctionapp --publish-local-settings -y
# if the command fails, uncomment the env block below to see a detailed log
# mine what originally a permissions issue where the identity was missing the `Website Contributor` role
# env:
# CLI_DEBUG: 1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use
local.settings.json
+func core tools
to control and publish environment variables to my Azure Function Apps. Because of the use of Key Vault References, there are no secrets in mylocal.settings.json
files.It would be nice to use this Azure Function Action and pass a command to update environment variables using
local.settings.json
.Beta Was this translation helpful? Give feedback.
All reactions