Skip to content
Open
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
11 changes: 9 additions & 2 deletions .github/workflows/selfie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ jobs:
make-everything-on-docker:
name: Make everything of selfie on docker
runs-on: ubuntu-latest
if: ${{ ((github.event_name != 'workflow_dispatch') || (github.event.inputs.rundocker == 'true')) && (((!github.event.repository.private) || ((github.ref == 'refs/heads/main') && (github.event_name != 'schedule'))) || (github.event_name == 'workflow_dispatch')) }}
# 1. Workflow is triggered by event workflow_dispatch.
# 2. Repository isn't private and workflow is triggered by push/pull to the main branch.
# 3. Repository isn't private and workflow is triggered by cron schedule.
if : ${{
((github.event_name == 'workflow_dispatch') && github.event.inputs.rundocker) ||
(!github.event.repository.private && (github.ref == 'refs/heads/main') && (github.event_name != 'schedule')) ||
(!github.event.repository.private && (github.event_name == 'schedule'))
}}

# usage: optional run argument --platform=linux/amd64 or --platform=linux/arm64
#
Expand Down Expand Up @@ -136,4 +143,4 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'cksystemsteaching/selfie' }}
run: |
echo '${{ secrets.DOCKERHUB_PASSWORD }}' | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push -a cksystemsteaching/selfie
docker push -a cksystemsteaching/selfie