Skip to content

ROX-27350: Switch determine-image-tag to trusted task #4902

ROX-27350: Switch determine-image-tag to trusted task

ROX-27350: Switch determine-image-tag to trusted task #4902

Workflow file for this run

name: Lint
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-24.04
container:
image: fedora:40
steps:
- name: dnf install dependencies
run: |
dnf install -y \
git \
golang \
shellcheck \
clang-tools-extra
echo "PATH=${HOME}/bin:${PATH}" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
with:
# fetch all to allow linting of differences between branches
fetch-depth: 0
- name: Mark repo as safe
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- uses: actions/setup-python@v5
- name: Install shfmt
run: |
GOBIN="${HOME}/bin/" go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Install actionlint
run: |
# Install actionlint to ~/bin/, otherwise pre-commit won't be able to find the executable.
GOBIN="${HOME}/bin/" go install github.com/rhysd/actionlint/cmd/actionlint@latest
- name: Run pre-commit
run: |
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install pre-commit
pre-commit run --show-diff-on-failure --color=always --all-files