mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-06 20:11:37 +00:00
Pin hashes in requirements (#7081)
* use global pin for requests * unify on yaml for workflo files * format workflow files * pin action versions * fix pinned version * use system venv * switch args * remove uv for now and add setting for pyyaml * use requirements file * also switch on docker flow * generate hashes * added hashes to reqs * add hashes for CI too * add hash checking * require hashes everywhere possible * require hashes where possible in docker
This commit is contained in:
7
.github/workflows/docker.yaml
vendored
7
.github/workflows/docker.yaml
vendored
@@ -24,10 +24,6 @@ on:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
env:
|
||||
requests_version: 2.31.0
|
||||
pyyaml_version: 6.0.1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -80,8 +76,7 @@ jobs:
|
||||
python-version: ${{ env.python_version }}
|
||||
- name: Version Check
|
||||
run: |
|
||||
pip install requests==${{ env.requests_version }}
|
||||
pip install pyyaml==${{ env.pyyaml_version }}
|
||||
pip install --require-hashes -r .github/requirements.txt
|
||||
python3 .github/scripts/version_check.py
|
||||
echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_ENV
|
||||
|
8
.github/workflows/qc_checks.yaml
vendored
8
.github/workflows/qc_checks.yaml
vendored
@@ -104,7 +104,7 @@ jobs:
|
||||
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # pin@v3.0.1
|
||||
- name: Check Version
|
||||
run: |
|
||||
pip install requests==${{ env.requests_version }}
|
||||
pip install --require-hashes -r .github/requirements.txt
|
||||
python3 .github/scripts/version_check.py
|
||||
|
||||
mkdocs:
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
python-version: ${{ env.python_version }}
|
||||
- name: Check Config
|
||||
run: |
|
||||
pip install pyyaml==${{ env.pyyaml_version }}
|
||||
pip install --require-hashes -r .github/requirements.txt
|
||||
pip install -r docs/requirements.txt
|
||||
python docs/ci/check_mkdocs_config.py
|
||||
- name: Check Links
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
- name: Download public schema
|
||||
if: needs.paths-filter.outputs.api == 'false'
|
||||
run: |
|
||||
pip install requests==${{ env.requests_version }} >/dev/null 2>&1
|
||||
pip install --require-hashes -r .github/requirements.txt >/dev/null 2>&1
|
||||
version="$(python3 .github/scripts/version_check.py only_version 2>&1)"
|
||||
echo "Version: $version"
|
||||
url="https://raw.githubusercontent.com/inventree/schema/main/export/${version}/api.yaml"
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
id: version
|
||||
if: github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true'
|
||||
run: |
|
||||
pip install requests==${{ env.requests_version }} >/dev/null 2>&1
|
||||
pip install --require-hashes -r .github/requirements.txt >/dev/null 2>&1
|
||||
version="$(python3 .github/scripts/version_check.py only_version 2>&1)"
|
||||
echo "Version: $version"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
5
.github/workflows/release.yaml
vendored
5
.github/workflows/release.yaml
vendored
@@ -5,9 +5,6 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
requests_version: 2.31.0
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -21,7 +18,7 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
||||
- name: Version Check
|
||||
run: |
|
||||
pip install requests==${{ env.requests_version }}
|
||||
pip install --require-hashes -r .github/requirements.txt
|
||||
python3 .github/scripts/version_check.py
|
||||
- name: Push to Stable Branch
|
||||
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # pin@v0.8.0
|
||||
|
2
.github/workflows/update.yml.disabled
vendored
2
.github/workflows/update.yml.disabled
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
||||
- name: Setup
|
||||
run: pip install -r requirements-dev.txt
|
||||
run: pip install --require-hashes -r requirements-dev.txt
|
||||
- name: Update requirements.txt
|
||||
run: pip-compile --output-file=requirements.txt requirements.in -U
|
||||
- name: Update requirements-dev.txt
|
||||
|
Reference in New Issue
Block a user