DEV Community

Discussion on: Publish your own Docker Images with GitHub Actions

Collapse
 
cicirello profile image
Vincent A. Cicirello

If you are hoping to condense the 2 workflows into one, you can probably use a conditional step that checks which event triggered that run. For example:

      - if: ${{ github.event_name == 'push' }}
        run: # thing you want to do on a push
Enter fullscreen mode Exit fullscreen mode

And then something similar for the schedule event.

Thread Thread
 
snakepy profile image
Fabio • Edited

I thought of doing it in a similar way! :D But it didn't work yet. I will revisit this next week.