From b233eb493cf3e0a48d00f88aa8a59036c2a58346 Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 14:49:42 +0000 Subject: [PATCH 1/7] Use entrypoint.sh to run action --- .github/workflows/linkcheck.yml | 15 +++++++++++++++ Dockerfile.github_action | 6 ++++++ action.yml | 14 ++++++-------- github_action_entrypoint.sh | 3 +++ 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/linkcheck.yml create mode 100644 Dockerfile.github_action create mode 100644 github_action_entrypoint.sh diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 0000000..6dca839 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,15 @@ +name: Test action + +on: push + +jobs: + linkcheck: + runs-on: ubuntu-latest + name: check links + steps: + - uses: actions/checkout@v2 + - name: Linkcheck + id: linkcheck + uses: ./ + with: + arguments: https://wunderundfitzig.de/skills -e --skip-file linkcheck-skip-file.txt diff --git a/Dockerfile.github_action b/Dockerfile.github_action new file mode 100644 index 0000000..e9869b4 --- /dev/null +++ b/Dockerfile.github_action @@ -0,0 +1,6 @@ +FROM google/dart + +RUN pub global activate linkcheck +COPY github_action_entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml index b644fda..38f97a3 100644 --- a/action.yml +++ b/action.yml @@ -1,16 +1,14 @@ -name: 'Check links with linkcheck' +name: "Check links with linkcheck" description: > Blazing fast localhost crawling via the linkcheck tool. branding: - icon: 'link' - color: 'green' + icon: "link" + color: "green" inputs: arguments: - description: 'The arguments you would pass to the linkcheck tool' + description: "The arguments you would pass to the linkcheck tool" required: true runs: - using: 'docker' - image: 'Dockerfile' - entrypoint: - ['sh', '-c', '/root/.pub-cache/bin/linkcheck ${{ inputs.arguments }}'] + using: "docker" + image: "Dockerfile.github_action" diff --git a/github_action_entrypoint.sh b/github_action_entrypoint.sh new file mode 100644 index 0000000..94e9659 --- /dev/null +++ b/github_action_entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sh -c "/root/.pub-cache/bin/linkcheck $INPUT_ARGUMENTS" \ No newline at end of file From 0fd2c689ede8b4688368691eeac72016d638116f Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:06:48 +0000 Subject: [PATCH 2/7] Change dockerfile name --- Dockerfile.github_action => GithubActionDockerfile | 0 action.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename Dockerfile.github_action => GithubActionDockerfile (100%) diff --git a/Dockerfile.github_action b/GithubActionDockerfile similarity index 100% rename from Dockerfile.github_action rename to GithubActionDockerfile diff --git a/action.yml b/action.yml index 38f97a3..792dcde 100644 --- a/action.yml +++ b/action.yml @@ -11,4 +11,4 @@ inputs: runs: using: "docker" - image: "Dockerfile.github_action" + image: "GithubActionDockerfile" From 6f917da8f0f5b9394e18e490080717acd4fe24bf Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:08:13 +0000 Subject: [PATCH 3/7] Make entrypoint file executable --- github_action_entrypoint.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 github_action_entrypoint.sh diff --git a/github_action_entrypoint.sh b/github_action_entrypoint.sh old mode 100644 new mode 100755 From 2a5ad62a9b41f7048bce0c9552936419a802d781 Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:09:28 +0000 Subject: [PATCH 4/7] Remove skipfile from test --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 6dca839..9f34c64 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -12,4 +12,4 @@ jobs: id: linkcheck uses: ./ with: - arguments: https://wunderundfitzig.de/skills -e --skip-file linkcheck-skip-file.txt + arguments: https://wunderundfitzig.de/skills -e From d7d1430e46a0280549c9860da1e0d264bfabc62b Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:13:20 +0000 Subject: [PATCH 5/7] Arguments as single string --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 9f34c64..0dc9afb 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -12,4 +12,4 @@ jobs: id: linkcheck uses: ./ with: - arguments: https://wunderundfitzig.de/skills -e + arguments: "https://wunderundfitzig.de/skills -e" From 191c022fec3de2ec76b79c417d99660297e0d22d Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:35:27 +0000 Subject: [PATCH 6/7] Remove linkcheck workflow again --- .github/workflows/linkcheck.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml deleted file mode 100644 index 0dc9afb..0000000 --- a/.github/workflows/linkcheck.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Test action - -on: push - -jobs: - linkcheck: - runs-on: ubuntu-latest - name: check links - steps: - - uses: actions/checkout@v2 - - name: Linkcheck - id: linkcheck - uses: ./ - with: - arguments: "https://wunderundfitzig.de/skills -e" From ff386c251c9aebac3051212e7d2408bbcf686a17 Mon Sep 17 00:00:00 2001 From: Manuel Reich Date: Tue, 23 Nov 2021 15:41:34 +0000 Subject: [PATCH 7/7] Undo format changes --- action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 792dcde..e16b1f3 100644 --- a/action.yml +++ b/action.yml @@ -1,14 +1,14 @@ -name: "Check links with linkcheck" +name: 'Check links with linkcheck' description: > Blazing fast localhost crawling via the linkcheck tool. branding: - icon: "link" - color: "green" + icon: 'link' + color: 'green' inputs: arguments: - description: "The arguments you would pass to the linkcheck tool" + description: 'The arguments you would pass to the linkcheck tool' required: true runs: - using: "docker" - image: "GithubActionDockerfile" + using: 'docker' + image: 'GithubActionDockerfile'