Skip to content

TEST

TEST #12

Workflow file for this run

name: Deploy to Azure
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.funcignore'
- '.github/workflows/deploy.yml'
- 'GitGitGadget/**'
permissions:
actions: read
attestations: read
checks: read
contents: read
deployments: read
discussions: read
id-token: write
issues: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
deploy:
if: github.event.repository.fork == false || vars.DEPLOY_WITH_WORKFLOWS != ''
environment: deploy-to-azure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: retrieve `vars.CONFIG` from workflows repo
if: vars.DEPLOY_WITH_WORKFLOWS != ''
env:
WORKFLOWS_REPO: '${{ vars.DEPLOY_WITH_WORKFLOWS }}'
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x &&
WORKFLOWS_OWNER="${WORKFLOWS_REPO%%/*}" &&
WORKFLOWS_NAME="${WORKFLOWS_REPO#*/}" &&
CONFIG="$(gh variable get CONFIG --repo "$WORKFLOWS_REPO")" &&
jq '. + { "workflowsRepo": { "owner": "'"$WORKFLOWS_OWNER"'", "name": "'"$WORKFLOWS_NAME"'" } }' \
<<<"$CONFIG" >GitGitGadget/gitgitgadget-config.json &&
echo "Using the following configuration:" &&
cat GitGitGadget/gitgitgadget-config.json
- name: 'Login via Azure CLI'
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: Azure/functions-action@v1
with:
app-name: ${{ secrets.AZURE_FUNCTION_NAME || 'GitGitGadget' }}
respect-funcignore: true