Only run workflows if they might be able to work (#72503)

* Fix whitespace

* Only run workflows if they might be able to work

* fix quotes

---------

Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
Josh Soref
2023-08-02 12:25:23 +01:00
committed by GitHub
co-authored by joshhunt
parent f59117057e
commit 9571aea651
24 changed files with 268 additions and 27 deletions
+17
View File
@@ -13,7 +13,24 @@ on:
type: string
jobs:
config:
runs-on: "ubuntu-latest"
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.GRAFANA_DELIVERY_BOT_APP_ID != '' && secrets.GRAFANA_DELIVERY_BOT_APP_PEM != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
main:
needs: config
if: needs.config.outputs.has-secrets
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Checkout Actions