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

Commit

Permalink
Merge pull request #310 from IKatsuba/fix-docker-publish
Browse files Browse the repository at this point in the history
fix: run docker publish if it available
  • Loading branch information
IKatsuba authored Jan 11, 2024
2 parents d81fc61 + e4201e7 commit 73de594
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit 73de594

Please sign in to comment.