Skip to content

Commit 50ed453

Browse files
authored
Merge pull request #75 from per1234/consistent-install-approach
Use consistent approach for installing tools from release assets
2 parents 3bc814a + 0854a7b commit 50ed453

File tree

3 files changed

+24
-60
lines changed

3 files changed

+24
-60
lines changed

.github/workflows/check-general-formatting-task.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,19 @@ jobs:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}
3131
version: 3.x
3232

33-
- name: Get data for latest editorconfig-checker release
34-
id: get-release-data
35-
uses: octokit/[email protected]
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Download latest editorconfig-checker release binary package
34+
id: download
35+
uses: MrOctopus/[email protected]
3836
with:
39-
# Pre-releases are ignored
40-
route: GET /repos/:owner/:repo/releases/latest
41-
# The following inputs result in "Unexpected input" warnings on the workflow run log and summary page,
42-
# but they are correct
43-
owner: editorconfig-checker
44-
repo: editorconfig-checker
45-
46-
- name: Download release binary
47-
id: download-release
48-
uses: carlosperate/[email protected]
49-
with:
50-
# See: https://github.com/editorconfig-checker/editorconfig-checker/releases
51-
file-url: https://github.com/editorconfig-checker/editorconfig-checker/releases/download/${{ fromJson(steps.get-release-data.outputs.data).tag_name }}/ec-linux-amd64.tar.gz
52-
location: ${{ env.EC_INSTALL_PATH }}
37+
repository: editorconfig-checker/editorconfig-checker
38+
excludes: prerelease, draft
39+
asset: linux-amd64.tar.gz
40+
target: ${{ env.EC_INSTALL_PATH }}
5341

5442
- name: Install editorconfig-checker
5543
run: |
5644
cd "${{ env.EC_INSTALL_PATH }}"
57-
tar --extract --file="${{ steps.download-release.outputs.file-path }}"
45+
tar --extract --file="${{ steps.download.outputs.name }}"
5846
# Give the binary a standard name
5947
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
6048
# Add installation to PATH:

workflow-templates/check-general-formatting-task.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,19 @@ jobs:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}
3131
version: 3.x
3232

33-
- name: Get data for latest editorconfig-checker release
34-
id: get-release-data
35-
uses: octokit/[email protected]
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Download latest editorconfig-checker release binary package
34+
id: download
35+
uses: MrOctopus/[email protected]
3836
with:
39-
# Pre-releases are ignored
40-
route: GET /repos/:owner/:repo/releases/latest
41-
# The following inputs result in "Unexpected input" warnings on the workflow run log and summary page,
42-
# but they are correct
43-
owner: editorconfig-checker
44-
repo: editorconfig-checker
45-
46-
- name: Download release binary
47-
id: download-release
48-
uses: carlosperate/[email protected]
49-
with:
50-
# See: https://github.com/editorconfig-checker/editorconfig-checker/releases
51-
file-url: https://github.com/editorconfig-checker/editorconfig-checker/releases/download/${{ fromJson(steps.get-release-data.outputs.data).tag_name }}/ec-linux-amd64.tar.gz
52-
location: ${{ env.EC_INSTALL_PATH }}
37+
repository: editorconfig-checker/editorconfig-checker
38+
excludes: prerelease, draft
39+
asset: linux-amd64.tar.gz
40+
target: ${{ env.EC_INSTALL_PATH }}
5341

5442
- name: Install editorconfig-checker
5543
run: |
5644
cd "${{ env.EC_INSTALL_PATH }}"
57-
tar --extract --file="${{ steps.download-release.outputs.file-path }}"
45+
tar --extract --file="${{ steps.download.outputs.name }}"
5846
# Give the binary a standard name
5947
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
6048
# Add installation to PATH:

workflow-templates/dependabot/workflow-template-copies/.github/workflows/check-general-formatting-task.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,19 @@ jobs:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}
3131
version: 3.x
3232

33-
- name: Get data for latest editorconfig-checker release
34-
id: get-release-data
35-
uses: octokit/[email protected]
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Download latest editorconfig-checker release binary package
34+
id: download
35+
uses: MrOctopus/[email protected]
3836
with:
39-
# Pre-releases are ignored
40-
route: GET /repos/:owner/:repo/releases/latest
41-
# The following inputs result in "Unexpected input" warnings on the workflow run log and summary page,
42-
# but they are correct
43-
owner: editorconfig-checker
44-
repo: editorconfig-checker
45-
46-
- name: Download release binary
47-
id: download-release
48-
uses: carlosperate/[email protected]
49-
with:
50-
# See: https://github.com/editorconfig-checker/editorconfig-checker/releases
51-
file-url: https://github.com/editorconfig-checker/editorconfig-checker/releases/download/${{ fromJson(steps.get-release-data.outputs.data).tag_name }}/ec-linux-amd64.tar.gz
52-
location: ${{ env.EC_INSTALL_PATH }}
37+
repository: editorconfig-checker/editorconfig-checker
38+
excludes: prerelease, draft
39+
asset: linux-amd64.tar.gz
40+
target: ${{ env.EC_INSTALL_PATH }}
5341

5442
- name: Install editorconfig-checker
5543
run: |
5644
cd "${{ env.EC_INSTALL_PATH }}"
57-
tar --extract --file="${{ steps.download-release.outputs.file-path }}"
45+
tar --extract --file="${{ steps.download.outputs.name }}"
5846
# Give the binary a standard name
5947
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
6048
# Add installation to PATH:

0 commit comments

Comments
 (0)