Skip to content

Commit 1e03139

Browse files
authored
Merge pull request #37 from Expensify/Rory-TellPeopleHowToRunTheChecks
GitHub Actions checks cleanup
2 parents 531bce6 + e96df90 commit 1e03139

File tree

11 files changed

+20
-308
lines changed

11 files changed

+20
-308
lines changed

.github/workflows/shellCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1717

1818
- name: Lint shell scripts with ShellCheck
19-
run: npm run shellCheck
19+
run: ./scripts/shellCheck.sh

.github/workflows/validateActions.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
run: npm i -g ajv-cli@5.0.0
2323

2424
- name: Validate action and workflow schemas
25-
run: GitHub-Actions/.github/scripts/validateWorkflowSchemas.sh
25+
run: GitHub-Actions/scripts/validateWorkflowSchemas.sh
2626
env:
2727
REPO_ROOT: ${{ steps.repo.outputs.NAME }}
2828

29+
- name: Tell people how to run the failing check
30+
if: failure()
31+
run: echo "::error::The validateWorkflowSchemas check failed! To run it locally, go to the root of ${{ steps.repo.outputs.NAME }} and run <path_to_github_actions_repo>/scripts/validateWorkflowSchemas.sh"
32+
2933
actionlint:
3034
runs-on: ubuntu-latest
3135
steps:
@@ -34,10 +38,14 @@ jobs:
3438
uses: Expensify/GitHub-Actions/checkoutRepoAndGitHubActions@main
3539

3640
- name: Lint workflows with actionlint
37-
run: GitHub-Actions/.github/scripts/actionlint.sh
41+
run: GitHub-Actions/scripts/actionlint.sh
3842
env:
3943
REPO_ROOT: ${{ steps.repo.outputs.NAME }}
4044

45+
- name: Tell people how to run the failing check
46+
if: failure()
47+
run: echo "::error::The actionlint check failed! To run it locally, go to the root of ${{ steps.repo.outputs.NAME }} and run <path_to_github_actions_repo>/scripts/actionlint.sh"
48+
4149
validateImmutableActionRefs:
4250
runs-on: ubuntu-latest
4351
steps:
@@ -46,6 +54,10 @@ jobs:
4654
uses: Expensify/GitHub-Actions/checkoutRepoAndGitHubActions@main
4755

4856
- name: Validate actions refs are immutable
49-
run: GitHub-Actions/.github/scripts/validateImmutableActionRefs.sh
57+
run: GitHub-Actions/scripts/validateImmutableActionRefs.sh
5058
env:
5159
REPO_ROOT: ${{ steps.repo.outputs.NAME }}
60+
61+
- name: Tell people how to run the failing check
62+
if: failure()
63+
run: echo "::error::The validateImmutableActionRefs check failed! To run it locally, go to the root of ${{ steps.repo.outputs.NAME }} and run <path_to_github_actions_repo>/scripts/validateImmutableActionRefs.sh"

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ dist/
2020

2121
# Ignore actionlint binary and any leftover directories related to installing it
2222
actionlint*
23-
!.github/scripts/actionlint.sh
24-
!.github/scripts/actionlint_checksums.txt
23+
!scripts/actionlint.sh
24+
!scripts/actionlint_checksums.txt

package-lock.json

Lines changed: 0 additions & 286 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." &>/dev/null && pwd)
3+
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)
44
readonly ROOT_DIR
55

6-
source "$ROOT_DIR"/.github/scripts/shellUtils.sh
6+
source "$ROOT_DIR"/scripts/shellUtils.sh
77

88
readonly DIRECTORIES_TO_IGNORE="
99
-path $ROOT_DIR/node_modules
File renamed without changes.

0 commit comments

Comments
 (0)