Skip to content
This repository has been archived by the owner on Mar 2, 2025. It is now read-only.

fix: run docker publish if it available #310

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/publish-to-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ on:
- 'main'

jobs:
check_secrets:
runs-on: ubuntu-latest
outputs:
secrets_available: ${{ steps.check.outputs.secrets_available }}
steps:
- id: check
run: |
if [[ -n "${{ secrets.DOCKERHUB_USERNAME }}" && -n "${{ secrets.DOCKERHUB_TOKEN }}" ]]; then
echo "::set-output name=secrets_available::true"
else
echo "::set-output name=secrets_available::false"
fi
shell: bash
build:
needs: check_secrets
if: ${{ needs.check_secrets.outputs.secrets_available == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
Loading