diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 34916b0..f70d57a 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -9,7 +9,7 @@ on: jobs: CLA: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 # This job should only run for pull request comments or pull request target events (not issue comments) if: github.event.issue.pull_request || github.event_name == 'pull_request_target' steps: diff --git a/.github/workflows/npmPublish.yml b/.github/workflows/npmPublish.yml index dccde2a..22aaf18 100644 --- a/.github/workflows/npmPublish.yml +++ b/.github/workflows/npmPublish.yml @@ -21,7 +21,7 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: read id-token: write # Required for OIDC: https://docs.npmjs.com/trusted-publishers diff --git a/.github/workflows/shellCheck.yml b/.github/workflows/shellCheck.yml index 8c736b4..6dc858b 100644 --- a/.github/workflows/shellCheck.yml +++ b/.github/workflows/shellCheck.yml @@ -9,7 +9,7 @@ on: jobs: lint: if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout # 4.2.2 diff --git a/.github/workflows/validateActions.yml b/.github/workflows/validateActions.yml index f3684b2..f99587a 100644 --- a/.github/workflows/validateActions.yml +++ b/.github/workflows/validateActions.yml @@ -9,7 +9,7 @@ on: pull_request jobs: validateSchemas: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 if: ${{ !contains(github.actor, '[bot]') && github.actor != 'MelvinBot' && github.actor != 'botify' && github.actor != 'OSBotify' }} steps: - name: Checkout repos @@ -34,7 +34,7 @@ jobs: run: echo "::error::The validateWorkflowSchemas check failed! To run it locally, go to the root of ${{ steps.repo.outputs.NAME }} and run /scripts/validateWorkflowSchemas.sh" actionlint: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 if: ${{ !contains(github.actor, '[bot]') && github.actor != 'MelvinBot' && github.actor != 'botify' && github.actor != 'OSBotify' }} steps: - name: Checkout repos @@ -51,7 +51,7 @@ jobs: run: echo "::error::The actionlint check failed! To run it locally, go to the root of ${{ steps.repo.outputs.NAME }} and run /scripts/actionlint.sh" validateImmutableActionRefs: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 if: ${{ !contains(github.actor, '[bot]') && github.actor != 'MelvinBot' && github.actor != 'botify' && github.actor != 'OSBotify' }} steps: - name: Checkout repos diff --git a/scripts/actionlint.sh b/scripts/actionlint.sh index e5229da..ca62076 100755 --- a/scripts/actionlint.sh +++ b/scripts/actionlint.sh @@ -119,7 +119,18 @@ fi info "Linting workflows..." echo cd "$REPO_ROOT" || exit 1 -if ! "$ACTIONLINT_PATH" -color; then + +# If a repo has it's own action lint config, use that. Otherwise, use the one in this repo. +CONFIG="" +if [[ ! -f "$REPO_ROOT/.github/actionlint.yml" ]] && [[ ! -f "$REPO_ROOT/.github/actionlint.yaml" ]]; then + CONFIG=" -config-file $(readlink -f "$SCRIPT_DIR"/../.github/actionlint.yml)" + info "Using default Github-Actions repo actionlint.yml" >&2 +fi + +# We can't quote CONFIG here because we need the splitting on spaces for it to be recognized +# by actionlint as a flag +#shellcheck disable=SC2086 +if ! "$ACTIONLINT_PATH" ${CONFIG} -color; then error "Workflows did not pass actionlint :(" exit 1 fi