--- name: Deploy on: workflow_dispatch: inputs: reason: required: true description: 'Reason for running this workflow' push: branches: - main # Trigger only on specific files being updated. paths: - Dockerfile - rootfs/** jobs: workflow-dispatch: name: Triggered via Workflow Dispatch? # only run this step if workflow dispatch triggered # log the reason the workflow dispatch was triggered if: | github.event_name == 'workflow_dispatch' && github.event.inputs.reason != '' runs-on: ubuntu-latest steps: - name: Log dispatch reason env: INPUTS_REASON: ${{ github.event.inputs.reason }} run: | echo "Workflow dispatch reason: $INPUTS_REASON" deploy: name: Deploy uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main with: push_enabled: true push_destinations: ghcr.io;dockerhub ghcr_repo_owner: ${{ github.repository_owner }} ghcr_repo: ${{ github.repository }} dockerhub_profile: mikenye dockerhub_repo: tar1090 get_version_method: git_commit_hash_short secrets: ghcr_token: ${{ secrets.GITHUB_TOKEN }} dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}