Skip to content

Commit

Permalink
Merge pull request #9 from PikachuEXE/create-pull-request/patch
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE authored Mar 22, 2024
2 parents 9b717a1 + 329b7d9 commit 41c4a2e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/etags/gh_actionlint_yaml.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"309e625615c7760dd8c80cc2c1d04c7d43cac0a229626b12f51e12d4ab1f88f5"
"8d7fe0443fc74ccd374ad91b36bf2c9fceec12159b324af126bcb7e0ef83e770"
2 changes: 1 addition & 1 deletion .github/etags/ghw_actionlint_yml.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"46143823db04a340c1575d3d9876564c430ccc7aadfbaeb0b02e7fd435d4492e"
"1e5eb5c361ed7886b7fe503820fd1c3da4acea108fbbb955326009516e8e1c01"
29 changes: 17 additions & 12 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,46 @@ on:
- master
paths:
- '.github/workflows/*.ya?ml'
- '.github/actionlint.yaml'
pull_request:
paths:
- '.github/workflows/*.ya?ml'
- '.github/actionlint.yaml'
merge_group:
concurrency:
group: "actionlint-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ENV_HINTS: 1
concurrency:
group: "actionlint-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
workflow_syntax:
if: github.repository_owner == 'PikachuEXE'
runs-on: ubuntu-22.04
container:
image: ghcr.io/homebrew/ubuntu22.04:master
steps:
- name: Set up Homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
core: true
cask: false
test-bot: false
- name: Set up actionlint
shell: bash
env:
HOMEBREW_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }}
HOMEBREW_TAP_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }}
run: |
brew install actionlint shellcheck
# Annotations work only relative to GITHUB_WORKSPACE
(shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_REPOSITORY:?}"/* "$GITHUB_WORKSPACE")
rmdir "$HOMEBREW_REPOSITORY"
ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_REPOSITORY"
(shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_TAP_REPOSITORY:?}"/* "$GITHUB_WORKSPACE")
rmdir "$HOMEBREW_TAP_REPOSITORY"
ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_TAP_REPOSITORY"
echo "::add-matcher::.github/actionlint-matcher.json"
# Setting `shell: /bin/bash` prevents shellcheck from running on
# those steps, so let's change them to `shell: bash` for linting.
sed -i 's:/bin/bash -e {0}:bash:' .github/workflows/*.y*ml
# The JSON matcher needs to be accessible to the container host.
cp "$(brew --repository)/.github/actionlint-matcher.json" "$HOME"
echo "::add-matcher::$HOME/actionlint-matcher.json"
- run: actionlint

0 comments on commit 41c4a2e

Please sign in to comment.