Skip to content

Debug Secrets in Github actions yml #29

Debug Secrets in Github actions yml

Debug Secrets in Github actions yml #29

name: Azure Static Web Apps CI/CD

Check failure on line 1 in .github/workflows/azure-static-web-apps-icy-plant-0291c0a0f.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/azure-static-web-apps-icy-plant-0291c0a0f.yml

Invalid workflow file

`secrets` is not a valid event name
on:
push:
branches:
- prod
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- prod
secrets:
AZURE_STORAGE_CONNECTION_STRING:
required: true
AZURE_STORAGE_ACCOUNT_NAME:
required: true
AZURE_STORAGE_URL:
required: true
AZURE_TENANT_ID:
required: true
AZURE_CLIENT_ID:
required: true
AZURE_CLIENT_SECRET:
required: true
AZURE_COSMOSDB_PG_URL:
required: true
AZURE_COSMOSDB_PG_USER:
required: true
AZURE_COSMOSDB_PG_PASSWORD:
required: true
AZURE_COSMOSDB_PG_DBNAME:
required: true
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Print environment variables
run: printenv
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: "prod"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_PLANT_0291C0A0F }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######
secrets: inherit
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_PLANT_0291C0A0F }}
action: "close"