ci: release docker in source only, take 2 (#9132)

* ci: release docker in source only (#8971)

* ci: release docker in source only

* condition at job level

* condition over secrets

* Apply suggestions from code review

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* ci: fix job condition

Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
Yishuai Li
2022-02-18 03:56:21 +08:00
committed by GitHub
co-authored by Tony
parent ccd6b3a26b
commit abfdcc8cdb
+12
View File
@@ -12,8 +12,20 @@ on:
- 'yarn.lock'
jobs:
check-env:
runs-on: ubuntu-latest
outputs:
check-docker: ${{ steps.check-docker.outputs.defined }}
steps:
- id: check-docker
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
if: ${{ env.DOCKER_USERNAME != '' }}
run: echo "::set-output name=defined::true"
release:
runs-on: ubuntu-latest
needs: check-env
if: needs.check-env.outputs.check-docker == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2