|
| 1 | +# This file is synced from the `Homebrew/.github` repository, and |
| 2 | +# modified for this `PikachuEXE/homebrew-FreeTube` repository. |
| 3 | + |
1 | 4 | name: actionlint
|
| 5 | + |
2 | 6 | on:
|
3 | 7 | push:
|
4 | 8 | branches:
|
5 | 9 | - master
|
6 | 10 | paths:
|
7 | 11 | - '.github/workflows/*.ya?ml'
|
8 |
| - - '.github/actionlint.yaml' |
9 | 12 | pull_request:
|
10 | 13 | paths:
|
11 | 14 | - '.github/workflows/*.ya?ml'
|
12 |
| - - '.github/actionlint.yaml' |
| 15 | + |
| 16 | +defaults: |
| 17 | + run: |
| 18 | + shell: bash -xeuo pipefail {0} |
| 19 | + |
13 | 20 | concurrency:
|
14 | 21 | group: "actionlint-${{ github.ref }}"
|
15 | 22 | cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
| 23 | + |
16 | 24 | env:
|
17 | 25 | HOMEBREW_DEVELOPER: 1
|
18 | 26 | HOMEBREW_NO_AUTO_UPDATE: 1
|
19 | 27 | HOMEBREW_NO_ENV_HINTS: 1
|
| 28 | + |
| 29 | +permissions: {} |
| 30 | + |
20 | 31 | jobs:
|
21 | 32 | workflow_syntax:
|
22 | 33 | if: github.repository_owner == 'PikachuEXE'
|
23 | 34 | runs-on: ubuntu-latest
|
24 |
| - container: |
25 |
| - # https://github.com/Homebrew/brew/pkgs/container/ubuntu24.04 |
26 |
| - image: ghcr.io/homebrew/ubuntu24.04:latest |
| 35 | + permissions: |
| 36 | + contents: read |
27 | 37 | steps:
|
28 | 38 | - name: Set up Homebrew
|
29 | 39 | id: setup-homebrew
|
30 | 40 | uses: Homebrew/actions/setup-homebrew@master
|
31 | 41 | with:
|
32 |
| - core: true |
| 42 | + core: false |
33 | 43 | cask: false
|
34 | 44 | test-bot: false
|
| 45 | + |
| 46 | + - name: Install tools |
| 47 | + run: brew install actionlint shellcheck |
| 48 | + |
| 49 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 50 | + with: |
| 51 | + persist-credentials: false |
| 52 | + |
35 | 53 | - name: Set up actionlint
|
36 |
| - shell: bash |
37 |
| - env: |
38 |
| - HOMEBREW_TAP_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }} |
39 |
| - run: | |
40 |
| - brew install actionlint shellcheck |
41 |
| -
|
42 |
| - # Annotations work only relative to GITHUB_WORKSPACE |
43 |
| - (shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_TAP_REPOSITORY:?}"/* "$GITHUB_WORKSPACE") |
44 |
| - rmdir "$HOMEBREW_TAP_REPOSITORY" |
45 |
| - ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_TAP_REPOSITORY" |
46 |
| -
|
47 |
| - # Setting `shell: /bin/bash` prevents shellcheck from running on |
48 |
| - # those steps, so let's change them to `shell: bash` for linting. |
49 |
| - sed -i 's:/bin/bash -e {0}:bash:' .github/workflows/*.y*ml |
50 |
| - # The JSON matcher needs to be accessible to the container host. |
51 |
| - cp "$(brew --repository)/.github/actionlint-matcher.json" "$HOME" |
52 |
| - echo "::add-matcher::$HOME/actionlint-matcher.json" |
| 54 | + run: echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json" |
| 55 | + |
53 | 56 | - run: actionlint
|
0 commit comments