We have some duplicated steps in our ruff workflow:
|
- name: Checkout Repository |
|
uses: actions/checkout@v3 |
|
with: |
|
# Get all history for the repository (branches, tags, etc). |
|
# This is required in order for git_ruff to work correctly |
|
fetch-depth: 0 |
|
path: src-repo |
|
- name: Checkout Workflow Repository |
|
uses: actions/checkout@v3 |
|
with: |
|
repository: irods/irods_reusable_github_workflows |
|
path: workflow-repo |
|
- name: Install Prerequisites |
|
run: | |
|
sudo apt-get update -qq |
|
sudo apt-get install -qq apt-transport-https ca-certificates |
|
sudo apt-get install -qq python3 |
|
sudo pip3 install termcolor ruff --break-system-packages |
|
- name: Checkout Repository |
|
uses: actions/checkout@v3 |
|
with: |
|
# Get all history for the repository (branches, tags, etc). |
|
# This is required in order for git_ruff to work correctly |
|
fetch-depth: 0 |
|
path: src-repo |
|
- name: Checkout Workflow Repository |
|
uses: actions/checkout@v3 |
|
with: |
|
repository: irods/irods_reusable_github_workflows |
|
path: workflow-repo |
|
- name: Install Prerequisites |
|
run: | |
|
sudo apt-get update -qq |
|
sudo apt-get install -qq apt-transport-https ca-certificates |
|
sudo apt-get install -qq python3 |
|
sudo pip3 install termcolor ruff --break-system-packages |
Let's investigate whether a composite action or yaml anchors would be suitable for deduplication.
We have some duplicated steps in our ruff workflow:
irods_reusable_github_workflows/.github/workflows/linter-irods-ruff.yml
Lines 13 to 30 in 80c3b7d
irods_reusable_github_workflows/.github/workflows/linter-irods-ruff.yml
Lines 38 to 55 in 80c3b7d
Let's investigate whether a composite action or yaml anchors would be suitable for deduplication.