diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 000000000..0e81e9174 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,43 @@ +name: Lint GitHub Actions workflows + +# Static-check the workflow YAML with rhysd/actionlint. Catches missing +# secrets, bad expressions, expression-type errors, unsupported runner +# images, and (via embedded shellcheck) common pitfalls in `run:` scripts. +# Trigger only on changes under .github/workflows/ so the rest of the +# matrix isn't billed when nothing here moves. + +on: + push: + branches: [ master ] + paths: + - '.github/workflows/*.yml' + - '.github/actionlint.yaml' + - '.github/actionlint.yml' + pull_request: + branches: [ master ] + paths: + - '.github/workflows/*.yml' + - '.github/actionlint.yaml' + - '.github/actionlint.yml' + +permissions: + contents: read + +jobs: + actionlint: + runs-on: ubuntu-latest + name: actionlint + steps: + - uses: actions/checkout@v4 + - name: install actionlint + # Pin a version so this job is reproducible; bump deliberately. + # The download script verifies a SHA256 of the release tarball. + run: | + bash <(curl --proto '=https' --tlsv1.2 -fsSL \ + https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) \ + 1.7.12 + echo "$PWD" >>"$GITHUB_PATH" + - name: actionlint --version + run: actionlint -version + - name: actionlint .github/workflows/*.yml + run: actionlint -color diff --git a/.github/workflows/almalinux-8-build.yml b/.github/workflows/almalinux-8-build.yml index 3eb96f9ac..e633153cd 100644 --- a/.github/workflows/almalinux-8-build.yml +++ b/.github/workflows/almalinux-8-build.yml @@ -65,7 +65,7 @@ jobs: run: RSYNC_EXPECT_SKIPPED=crtimes,daemon-access-ip,daemon-chroot-acl,proxy-response-line-too-long make check - name: check (TCP daemon transport) # Second run exercising the real loopback-TCP daemon path. - run: ./runtests.py --rsync-bin=`pwd`/rsync --use-tcp -j 8 + run: ./runtests.py --rsync-bin="$PWD/rsync" --use-tcp -j 8 - name: ssl file list run: ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 71d9f37fd..7c070db70 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -27,7 +27,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl gcovr - echo "/usr/local/bin" >>$GITHUB_PATH + echo "/usr/local/bin" >>"$GITHUB_PATH" - name: configure run: ./configure --enable-coverage --with-rrsync - name: make diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 6af741fd3..0653a6036 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -26,7 +26,7 @@ jobs: run: | brew install automake openssl xxhash zstd lz4 pip3 install --user --break-system-packages commonmark - echo "$(brew --prefix)/bin" >>$GITHUB_PATH + echo "$(brew --prefix)/bin" >>"$GITHUB_PATH" - name: configure run: | BREW_PREFIX=$(brew --prefix) @@ -48,7 +48,7 @@ jobs: - name: check (TCP daemon transport) # Second run with daemon tests over a real loopback rsyncd; the default # 'make check' above uses the secure stdio-pipe transport. - run: sudo ./runtests.py --rsync-bin=`pwd`/rsync --use-tcp -j 8 + run: sudo ./runtests.py --rsync-bin="$PWD/rsync" --use-tcp -j 8 - name: ssl file list run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact diff --git a/.github/workflows/ubuntu-22.04-build.yml b/.github/workflows/ubuntu-22.04-build.yml index 3cf271e55..19f9cc037 100644 --- a/.github/workflows/ubuntu-22.04-build.yml +++ b/.github/workflows/ubuntu-22.04-build.yml @@ -29,7 +29,7 @@ jobs: - name: prep run: | sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl - echo "/usr/local/bin" >>$GITHUB_PATH + echo "/usr/local/bin" >>"$GITHUB_PATH" - name: configure run: ./configure --with-rrsync - name: make @@ -47,7 +47,7 @@ jobs: - name: check (TCP daemon transport) # Second run with daemon tests over a real loopback rsyncd; the default # 'make check' above uses the secure stdio-pipe transport. - run: sudo ./runtests.py --rsync-bin=`pwd`/rsync --use-tcp -j 8 + run: sudo ./runtests.py --rsync-bin="$PWD/rsync" --use-tcp -j 8 - name: ssl file list run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 47312f0a8..b3e67d0ac 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -25,7 +25,7 @@ jobs: - name: prep run: | sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl - echo "/usr/local/bin" >>$GITHUB_PATH + echo "/usr/local/bin" >>"$GITHUB_PATH" - name: configure run: ./configure --with-rrsync - name: make @@ -45,7 +45,7 @@ jobs: # 'make check' above uses the secure stdio-pipe transport (no listening # sockets); this run exercises the real TCP accept/auth path. Skip-set # is env-dependent here (chroot-acl), so leave RSYNC_EXPECT_SKIPPED unset. - run: sudo ./runtests.py --rsync-bin=`pwd`/rsync --use-tcp -j 8 + run: sudo ./runtests.py --rsync-bin="$PWD/rsync" --use-tcp -j 8 - name: ssl file list run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact