I recently added a Github Actions workflow to my Extensions.Caching.PostgreSQL open-source project.
Here is the workflow I’m using:
Something that I found confusing when using GitHub actions was that for some steps you had to use the uses syntax, while others use the run syntax.
Let’s investigate the difference between the two.
Uses
uses is used for actions that run as part of a step in your workflow.
Some actions require inputs that must set with the with keyword:
Actions can be either JavaScript files or Docker containers.
More information: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Run
run is used for running command-line programs in a command line shell.
You specify the full command including arguments:
More information: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun