Browse Source

Look for secrets before using them (#2918)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
pull/3506/head
Josh Soref 2 years ago committed by GitHub
parent
commit
8e59b6d3b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 20
      .github/workflows/artifacts.yaml

20
.github/workflows/artifacts.yaml

@ -28,10 +28,26 @@ permissions:
contents: read
jobs:
container-image:
name: Container image
config:
runs-on: ubuntu-latest
steps:
- name: Check Secrets
id: check-secrets
env:
username: ${{ secrets.DOCKER_USERNAME || '' }}
password: ${{ secrets.DOCKER_PASSWORD || '' }}
if: ${{ env.username != '' && env.password != '' }}
shell: bash
run:
echo has-secrets=1 >> "$GITHUB_OUTPUT"
outputs:
has-secrets: ${{ steps.check-secrets.outputs.has-secrets }}
container-images:
name: Container images
runs-on: ubuntu-latest
needs: config
if: ${{ needs.config.outputs.has-secrets }}
strategy:
matrix:
variant:

Loading…
Cancel
Save