4 ms·
Nice idea, worth mentioning other features: - Reusable workflows (note: matrix strategy doesn't work here): https://docs.github.com/en/actions/using-workflows/
by pqb 5y ago
Nice idea, worth mentioning other features:
- Reusable workflows (note: matrix strategy doesn't work here): https://docs.github.com/en/actions/using-workflows/reusing-workflows https://docs.github.com/en/actions/using-workflows/reusing-w...
- Creating an action: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions https://docs.github.com/en/actions/creating-actions/metadata...
- Composite actions: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action https://docs.github.com/en/actions/creating-actions/creating...
- Fact, the "uses" in step can be a relative path in the same repository (obviously, you must checkout the code, when it uses a relative path): https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions https://docs.github.com/en/actions/using-workflows/workflow-...
- Script as an action: https://github.com/actions/github-script https://github.com/actions/github-script
- Using GitHub Packages and artifacts: https://docs.github.com/en/actions/publishing-packages/about-packaging-with-github-actions https://docs.github.com/en/actions/publishing-packages/about...
- Using docker-compose-like services that run alongside of the container: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers https://docs.github.com/en/actions/using-containerized-servi...
- Using heredoc to share multi-line JSON in an environment variable, also using fromJSON/toJSON functions:
- name: get-version
id: get-version
run: |-
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
cat package.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: print-version
run: echo "${{ fromJSON(env.JSON_RESPONSE).version }}"
- The matrix/strategy of the dependent workflow can be created dynamically, like in the following workflow: https://github.com/googleapis/google-cloud-go/blob/83bbc2e7c67a9452adb7a1d56ea2f58bfc6b851c/.github/workflows/release-submodule.yaml#L36 https://github.com/googleapis/google-cloud-go/blob/83bbc2e7c...
And many, many more :)
- macintoshpie 5y agoSick! I've been meaning to add more to this for a while, thanks for the suggestions