mirror of
https://github.com/actions/setup-python.git
synced 2026-11-20 19:53:05 +00:00
Compare commits
2 Commits
08098e0782
...
v7.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fda3b95a4 | ||
|
|
4ab7e95f05 |
14
.github/workflows/e2e-cache-freethreaded.yml
vendored
14
.github/workflows/e2e-cache-freethreaded.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -66,7 +66,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
id: cache-pipenv
|
id: cache-pipenv
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
python-version: [3.13.14, 3.14.6]
|
python-version: [3.13.14, 3.14.6]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pipx install poetry
|
run: pipx install poetry
|
||||||
- name: Init pyproject.toml
|
- name: Init pyproject.toml
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -172,7 +172,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
id: cache-pipenv
|
id: cache-pipenv
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -216,7 +216,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -247,7 +247,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: 3.13.14t
|
python-version: 3.13.14t
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
14
.github/workflows/e2e-cache.yml
vendored
14
.github/workflows/e2e-cache.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
|||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: pypy-3.11-v7.x
|
python-version: pypy-3.11-v7.x
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
id: cache-pipenv
|
id: cache-pipenv
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -131,7 +131,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: |
|
run: |
|
||||||
pipx install poetry
|
pipx install poetry
|
||||||
@@ -175,7 +175,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -210,7 +210,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: pypy-3.11-v7.x
|
python-version: pypy-3.11-v7.x
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
id: cache-pipenv
|
id: cache-pipenv
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -259,7 +259,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -290,7 +290,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: Run with setup-python 3.10.11
|
- name: Run with setup-python 3.10.11
|
||||||
if: matrix.operating-system != 'windows-11-arm'
|
if: matrix.operating-system != 'windows-11-arm'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out
|
- name: Checking out
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Publish
|
- name: Publish
|
||||||
id: publish
|
id: publish
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
|
||||||
|
|||||||
6
.github/workflows/test-graalpy.yml
vendored
6
.github/workflows/test-graalpy.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.graalpy }}
|
- name: setup-python ${{ matrix.graalpy }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -85,7 +85,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.graalpy }}
|
- name: setup-python ${{ matrix.graalpy }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup GraalPy and check latest
|
- name: Setup GraalPy and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
id: graalpy
|
id: graalpy
|
||||||
|
|||||||
10
.github/workflows/test-pypy.yml
vendored
10
.github/workflows/test-pypy.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.pypy }}
|
- name: setup-python ${{ matrix.pypy }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.pypy }}
|
- name: setup-python ${{ matrix.pypy }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.pypy }}
|
- name: setup-python ${{ matrix.pypy }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -171,7 +171,7 @@ jobs:
|
|||||||
macos-latest
|
macos-latest
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup PyPy and check latest
|
- name: Setup PyPy and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -212,7 +212,7 @@ jobs:
|
|||||||
macos-latest
|
macos-latest
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup PyPy and check latest
|
- name: Setup PyPy and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
30
.github/workflows/test-python-freethreaded.yml
vendored
30
.github/workflows/test-python-freethreaded.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t]
|
python: [3.13.14t, 3.14.6t]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.python }}
|
- name: setup-python ${{ matrix.python }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t]
|
python: [3.13.14t, 3.14.6t]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: echo ${{ matrix.python }} > .python-version
|
run: echo ${{ matrix.python }} > .python-version
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t]
|
python: [3.13.14t, 3.14.6t]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: echo ${{ matrix.python }} > .python-version
|
run: echo ${{ matrix.python }} > .python-version
|
||||||
@@ -148,7 +148,7 @@ jobs:
|
|||||||
python: [3.13.14, 3.14.6]
|
python: [3.13.14, 3.14.6]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -189,7 +189,7 @@ jobs:
|
|||||||
python: [3.13.14, 3.14.6]
|
python: [3.13.14, 3.14.6]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -230,7 +230,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t, 3.15t-dev]
|
python: [3.13.14t, 3.14.6t, 3.15t-dev]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-tool-versions-file ${{ matrix.python }}
|
- name: build-tool-versions-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -261,7 +261,7 @@ jobs:
|
|||||||
python: [3.13t, 3.15t-dev]
|
python: [3.13t, 3.15t-dev]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -301,7 +301,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t, 3.15t-dev]
|
python: [3.13.14t, 3.14.6t, 3.15t-dev]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -340,7 +340,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15.0-beta.3
|
- name: setup-python 3.15.0-beta.3
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -377,7 +377,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15t-dev
|
- name: setup-python 3.15t-dev
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -414,7 +414,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15t
|
- name: setup-python 3.15t
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -453,7 +453,7 @@ jobs:
|
|||||||
python: [3.13.14t, 3.14.6t]
|
python: [3.13.14t, 3.14.6t]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.python }}
|
- name: setup-python ${{ matrix.python }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -485,7 +485,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
python-version: [3.13t, 3.15t-dev]
|
python-version: [3.13t, 3.15t-dev]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python and check latest
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -511,7 +511,7 @@ jobs:
|
|||||||
macos-latest
|
macos-latest
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup multiple Python versions
|
- name: Setup multiple Python versions
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -542,7 +542,7 @@ jobs:
|
|||||||
python: [3.13.14, 3.14.6, 3.15-dev, 3.15.0-beta.3]
|
python: [3.13.14, 3.14.6, 3.15-dev, 3.15.0-beta.3]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: setup-python ${{ matrix.python }}
|
- name: setup-python ${{ matrix.python }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
28
.github/workflows/test-python.yml
vendored
28
.github/workflows/test-python.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.python }}
|
- name: setup-python ${{ matrix.python }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: echo ${{ matrix.python }} > .python-version
|
run: echo ${{ matrix.python }} > .python-version
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: echo ${{ matrix.python }} > .python-version
|
run: echo ${{ matrix.python }} > .python-version
|
||||||
@@ -181,7 +181,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -234,7 +234,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -291,7 +291,7 @@ jobs:
|
|||||||
python: pypy3.11-7.3.18
|
python: pypy3.11-7.3.18
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-tool-versions-file ${{ matrix.python }}
|
- name: build-tool-versions-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -325,7 +325,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -378,7 +378,7 @@ jobs:
|
|||||||
python: 3.10.11
|
python: 3.10.11
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: build-version-file ${{ matrix.python }}
|
- name: build-version-file ${{ matrix.python }}
|
||||||
run: |
|
run: |
|
||||||
@@ -427,7 +427,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15.0-beta.3
|
- name: setup-python 3.15.0-beta.3
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -470,7 +470,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15-dev
|
- name: setup-python 3.15-dev
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -507,7 +507,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python 3.15
|
- name: setup-python 3.15
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -549,7 +549,7 @@ jobs:
|
|||||||
python: '3.10'
|
python: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: setup-python ${{ matrix.python }}
|
- name: setup-python ${{ matrix.python }}
|
||||||
id: setup-python
|
id: setup-python
|
||||||
@@ -584,7 +584,7 @@ jobs:
|
|||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -616,7 +616,7 @@ jobs:
|
|||||||
macos-latest
|
macos-latest
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.licenses/npm/@actions/cache.dep.yml
generated
2
.licenses/npm/@actions/cache.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/cache"
|
name: "@actions/cache"
|
||||||
version: 6.1.0
|
version: 6.2.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions cache lib
|
summary: Actions cache lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -29,8 +29,8 @@ See [action.yml](action.yml)
|
|||||||
**Python**
|
**Python**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -39,8 +39,8 @@ steps:
|
|||||||
**PyPy**
|
**PyPy**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: 'pypy3.10'
|
python-version: 'pypy3.10'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -49,8 +49,8 @@ steps:
|
|||||||
**GraalPy**
|
**GraalPy**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: 'graalpy-24.0'
|
python-version: 'graalpy-24.0'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -59,8 +59,8 @@ steps:
|
|||||||
**Free threaded Python**
|
**Free threaded Python**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13t'
|
python-version: '3.13t'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -94,8 +94,8 @@ The action defaults to searching for a dependency file (`requirements.txt` or `p
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip' # caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|||||||
144
dist/cache-save/index.js
vendored
144
dist/cache-save/index.js
vendored
@@ -41200,7 +41200,7 @@ module.exports = { version: packageJson.version }
|
|||||||
/***/ 4012:
|
/***/ 4012:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.1.0","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.4"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
|
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.2.0","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.4"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
@@ -45451,6 +45451,10 @@ const SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32
|
|||||||
const TarFilename = 'cache.tar';
|
const TarFilename = 'cache.tar';
|
||||||
const ManifestFilename = 'manifest.txt';
|
const ManifestFilename = 'manifest.txt';
|
||||||
const CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
const CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
|
// Prefix the cache backend embeds in a read-denial message (v2 twirp
|
||||||
|
// GetCacheEntryDownloadURL error or the GHES v1 `_apis/artifactcache` 403 body).
|
||||||
|
// Shared so cache.ts and cacheHttpClient.ts match the same contract value.
|
||||||
|
const constants_CacheReadDeniedMessagePrefix = 'cache read denied:';
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
;// CONCATENATED MODULE: ./node_modules/@actions/cache/lib/internal/cacheUtils.js
|
;// CONCATENATED MODULE: ./node_modules/@actions/cache/lib/internal/cacheUtils.js
|
||||||
var cacheUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var cacheUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
@@ -95156,6 +95160,24 @@ function config_getCacheServiceVersion() {
|
|||||||
return 'v1';
|
return 'v1';
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1';
|
||||||
}
|
}
|
||||||
|
// The cache-mode lattice: readable = {read, write}, writable = {write,
|
||||||
|
// write-only}, none = neither.
|
||||||
|
const KNOWN_CACHE_MODES = ['none', 'read', 'write', 'write-only'];
|
||||||
|
// The effective cache-mode exported by the runner, or '' when not set.
|
||||||
|
function config_getCacheMode() {
|
||||||
|
return (process.env['ACTIONS_CACHE_MODE'] || '').trim().toLowerCase();
|
||||||
|
}
|
||||||
|
// Unset or unrecognized modes are permissive so behavior matches today.
|
||||||
|
function config_isCacheReadable(mode) {
|
||||||
|
if (!KNOWN_CACHE_MODES.includes(mode))
|
||||||
|
return true;
|
||||||
|
return mode === 'read' || mode === 'write';
|
||||||
|
}
|
||||||
|
function isCacheWritable(mode) {
|
||||||
|
if (!KNOWN_CACHE_MODES.includes(mode))
|
||||||
|
return true;
|
||||||
|
return mode === 'write' || mode === 'write-only';
|
||||||
|
}
|
||||||
function getCacheServiceURL() {
|
function getCacheServiceURL() {
|
||||||
const version = config_getCacheServiceVersion();
|
const version = config_getCacheServiceVersion();
|
||||||
// Based on the version of the cache service, we will determine which
|
// Based on the version of the cache service, we will determine which
|
||||||
@@ -95205,6 +95227,7 @@ var cacheHttpClient_awaiter = (undefined && undefined.__awaiter) || function (th
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getCacheApiUrl(resource) {
|
function getCacheApiUrl(resource) {
|
||||||
const baseUrl = getCacheServiceURL();
|
const baseUrl = getCacheServiceURL();
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
@@ -95232,6 +95255,7 @@ function createHttpClient() {
|
|||||||
}
|
}
|
||||||
function getCacheEntry(keys, paths, options) {
|
function getCacheEntry(keys, paths, options) {
|
||||||
return cacheHttpClient_awaiter(this, void 0, void 0, function* () {
|
return cacheHttpClient_awaiter(this, void 0, void 0, function* () {
|
||||||
|
var _a;
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
|
const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
|
||||||
const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
|
const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
|
||||||
@@ -95245,6 +95269,12 @@ function getCacheEntry(keys, paths, options) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!isSuccessStatusCode(response.statusCode)) {
|
if (!isSuccessStatusCode(response.statusCode)) {
|
||||||
|
// Only surface the receiver's body for a `cache read denied:` policy denial
|
||||||
|
// so callers can dispatch on it; keep the generic message otherwise.
|
||||||
|
const errorMessage = (_a = response.error) === null || _a === void 0 ? void 0 : _a.message;
|
||||||
|
if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.includes(CacheReadDeniedMessagePrefix)) {
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
throw new Error(`Cache service responded with ${response.statusCode}`);
|
throw new Error(`Cache service responded with ${response.statusCode}`);
|
||||||
}
|
}
|
||||||
const cacheResult = response.result;
|
const cacheResult = response.result;
|
||||||
@@ -96505,6 +96535,7 @@ var cache_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -96520,19 +96551,20 @@ class ReserveCacheError extends Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Stable prefix the receiver writes into the cache reservation response when
|
* Stable prefix the cache service writes into the cache reservation response
|
||||||
* the issuer downgraded the cache token to read-only (for example, because
|
* when the issuer downgraded the cache token to read-only (for example, because
|
||||||
* the run was triggered by an untrusted event). saveCacheV1 / saveCacheV2
|
* the run was triggered by an untrusted event). saveCacheV1 / saveCacheV2
|
||||||
* dispatch on this prefix to re-classify the failure as a
|
* dispatch on this prefix to re-classify the failure as a CacheWriteDeniedError
|
||||||
* CacheWriteDeniedError so consumers (and the outer catch arm) can
|
* so consumers and tests can distinguish a policy denial from other reservation
|
||||||
* distinguish a policy denial from other reservation failures.
|
* failures. Internally it is logged as a non-fatal warning like other
|
||||||
|
* best-effort save failures.
|
||||||
*/
|
*/
|
||||||
const CACHE_WRITE_DENIED_PREFIX = 'cache write denied:';
|
const CACHE_WRITE_DENIED_PREFIX = 'cache write denied:';
|
||||||
/**
|
/**
|
||||||
* Raised when the cache backend refuses to reserve a writable cache entry
|
* Raised when the cache backend refuses to reserve a writable cache entry
|
||||||
* because the JWT issued for this run was scoped read-only (for example, the
|
* because the JWT issued for this run was scoped read-only (for example, the
|
||||||
* run was triggered by an event the repository administrator classified as
|
* run was triggered by an event the repository administrator classified as
|
||||||
* untrusted). The receiver-supplied detail message always begins with
|
* untrusted). The service-supplied detail message always begins with
|
||||||
* `cache write denied:` (the full error message includes additional context
|
* `cache write denied:` (the full error message includes additional context
|
||||||
* like the cache key).
|
* like the cache key).
|
||||||
*
|
*
|
||||||
@@ -96548,6 +96580,19 @@ class CacheWriteDeniedError extends ReserveCacheError {
|
|||||||
Object.setPrototypeOf(this, CacheWriteDeniedError.prototype);
|
Object.setPrototypeOf(this, CacheWriteDeniedError.prototype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Re-exported from constants so consumers keep referencing it here; the shared
|
||||||
|
// value also drives detection in cacheHttpClient without duplicating the string.
|
||||||
|
const CACHE_READ_DENIED_PREFIX = (/* unused pure expression or super */ null && (CacheReadDeniedMessagePrefix));
|
||||||
|
// Raised when the cache backend denies a download URL because the run's token
|
||||||
|
// has no readable cache scopes. Caching is best-effort, so restoreCache logs a
|
||||||
|
// warning and reports a cache miss rather than rethrowing this.
|
||||||
|
class CacheReadDeniedError extends Error {
|
||||||
|
constructor(message) {
|
||||||
|
super(message);
|
||||||
|
this.name = 'CacheReadDeniedError';
|
||||||
|
Object.setPrototypeOf(this, CacheReadDeniedError.prototype);
|
||||||
|
}
|
||||||
|
}
|
||||||
class FinalizeCacheError extends Error {
|
class FinalizeCacheError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -96602,6 +96647,12 @@ function restoreCache(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
const cacheServiceVersion = getCacheServiceVersion();
|
const cacheServiceVersion = getCacheServiceVersion();
|
||||||
core.debug(`Cache service version: ${cacheServiceVersion}`);
|
core.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
|
const cacheMode = getCacheMode();
|
||||||
|
if (!isCacheReadable(cacheMode)) {
|
||||||
|
core.info(`Cache restore skipped: the effective cache-mode '${cacheMode}' does not permit reads.`);
|
||||||
|
core.debug(`Skipped restore for paths [${paths.join(', ')}] with primary key '${primaryKey}'.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -96623,6 +96674,7 @@ function restoreCache(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
*/
|
*/
|
||||||
function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
||||||
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
|
var _a;
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
const keys = [primaryKey, ...restoreKeys];
|
const keys = [primaryKey, ...restoreKeys];
|
||||||
core.debug('Resolved Keys:');
|
core.debug('Resolved Keys:');
|
||||||
@@ -96637,10 +96689,26 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
let archivePath = '';
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
// path are needed to compute version
|
// path are needed to compute version
|
||||||
const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
|
let cacheEntry;
|
||||||
compressionMethod,
|
try {
|
||||||
enableCrossOsArchive
|
cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
|
||||||
});
|
compressionMethod,
|
||||||
|
enableCrossOsArchive
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// The v1 artifact cache service returns HTTP 403 with a
|
||||||
|
// `cache read denied:` body when the run's token has no readable cache
|
||||||
|
// scopes. getCacheEntry lives in a dependency-free internal module and
|
||||||
|
// cannot import CacheReadDeniedError without a circular dependency, so it
|
||||||
|
// only surfaces the raw denial message; we classify it into the typed
|
||||||
|
// error here so the outer catch and consumers can dispatch on it.
|
||||||
|
const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '';
|
||||||
|
if (errorMessage.includes(CACHE_READ_DENIED_PREFIX)) {
|
||||||
|
throw new CacheReadDeniedError(errorMessage);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
|
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -96669,7 +96737,9 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// warn on cache restore failure and continue build
|
// warn on cache restore failure and continue build
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A read denied by policy (CacheReadDeniedError) is not an HttpClientError
|
||||||
|
// so it falls here and is warned, treated as a cache miss.
|
||||||
if (typedError instanceof HttpClientError &&
|
if (typedError instanceof HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96704,6 +96774,7 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
*/
|
*/
|
||||||
function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
||||||
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
|
var _a;
|
||||||
// Override UploadOptions to force the use of Azure
|
// Override UploadOptions to force the use of Azure
|
||||||
options = Object.assign(Object.assign({}, options), { useAzureSdk: true });
|
options = Object.assign(Object.assign({}, options), { useAzureSdk: true });
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -96725,7 +96796,20 @@ function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
restoreKeys,
|
restoreKeys,
|
||||||
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
|
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
|
||||||
};
|
};
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
let response;
|
||||||
|
try {
|
||||||
|
response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// The receiver returns twirp PermissionDenied (403) when the run's token
|
||||||
|
// has no readable cache scopes. The client wraps that 403, so the stable
|
||||||
|
// prefix is embedded in the message rather than leading it.
|
||||||
|
const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '';
|
||||||
|
if (errorMessage.includes(CACHE_READ_DENIED_PREFIX)) {
|
||||||
|
throw new CacheReadDeniedError(errorMessage);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -96760,8 +96844,10 @@ function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Supress all non-validation cache related errors because caching should be optional
|
// Suppress all non-validation cache related errors because caching should be optional
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A read denied by policy (CacheReadDeniedError) is not an HttpClientError
|
||||||
|
// so it falls here and is warned, treated as a cache miss.
|
||||||
if (typedError instanceof HttpClientError &&
|
if (typedError instanceof HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96800,6 +96886,12 @@ function cache_saveCache(paths_1, key_1, options_1) {
|
|||||||
core_debug(`Cache service version: ${cacheServiceVersion}`);
|
core_debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
|
const cacheMode = config_getCacheMode();
|
||||||
|
if (!isCacheWritable(cacheMode)) {
|
||||||
|
info(`Cache save skipped: the effective cache-mode '${cacheMode}' does not permit writes.`);
|
||||||
|
core_debug(`Skipped save for paths [${paths.join(', ')}] with key '${key}'.`);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return yield saveCacheV2(paths, key, options, enableCrossOsArchive);
|
return yield saveCacheV2(paths, key, options, enableCrossOsArchive);
|
||||||
@@ -96877,17 +96969,14 @@ function saveCacheV1(paths_1, key_1, options_1) {
|
|||||||
if (typedError.name === ValidationError.name) {
|
if (typedError.name === ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else if (typedError.name === CacheWriteDeniedError.name) {
|
|
||||||
// Cache write was denied by policy (read-only token). Surface to the
|
|
||||||
// customer at warning level so it is visible in the workflow log
|
|
||||||
// without failing the run.
|
|
||||||
warning(`Failed to save: ${typedError.message}`);
|
|
||||||
}
|
|
||||||
else if (typedError.name === ReserveCacheError.name) {
|
else if (typedError.name === ReserveCacheError.name) {
|
||||||
info(`Failed to save: ${typedError.message}`);
|
info(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A write denied by policy (CacheWriteDeniedError) is not an
|
||||||
|
// HttpClientError and its name does not match the ReserveCacheError arm,
|
||||||
|
// so it falls here and is warned without failing the run.
|
||||||
if (typedError instanceof lib_HttpClientError &&
|
if (typedError instanceof lib_HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96998,12 +97087,6 @@ function saveCacheV2(paths_1, key_1, options_1) {
|
|||||||
if (typedError.name === ValidationError.name) {
|
if (typedError.name === ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else if (typedError.name === CacheWriteDeniedError.name) {
|
|
||||||
// Cache write was denied by policy (read-only token). Surface to the
|
|
||||||
// customer at warning level so it is visible in the workflow log
|
|
||||||
// without failing the run.
|
|
||||||
warning(`Failed to save: ${typedError.message}`);
|
|
||||||
}
|
|
||||||
else if (typedError.name === ReserveCacheError.name) {
|
else if (typedError.name === ReserveCacheError.name) {
|
||||||
info(`Failed to save: ${typedError.message}`);
|
info(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
@@ -97011,7 +97094,10 @@ function saveCacheV2(paths_1, key_1, options_1) {
|
|||||||
warning(typedError.message);
|
warning(typedError.message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A write denied by policy (CacheWriteDeniedError) is not an
|
||||||
|
// HttpClientError and its name does not match the ReserveCacheError arm,
|
||||||
|
// so it falls here and is warned without failing the run.
|
||||||
if (typedError instanceof lib_HttpClientError &&
|
if (typedError instanceof lib_HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
|
|||||||
144
dist/setup/index.js
vendored
144
dist/setup/index.js
vendored
@@ -41200,7 +41200,7 @@ module.exports = { version: packageJson.version }
|
|||||||
/***/ 4012:
|
/***/ 4012:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.1.0","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.4"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
|
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.2.0","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.4"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
@@ -45441,6 +45441,10 @@ const SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32
|
|||||||
const TarFilename = 'cache.tar';
|
const TarFilename = 'cache.tar';
|
||||||
const constants_ManifestFilename = 'manifest.txt';
|
const constants_ManifestFilename = 'manifest.txt';
|
||||||
const CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
const CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
|
// Prefix the cache backend embeds in a read-denial message (v2 twirp
|
||||||
|
// GetCacheEntryDownloadURL error or the GHES v1 `_apis/artifactcache` 403 body).
|
||||||
|
// Shared so cache.ts and cacheHttpClient.ts match the same contract value.
|
||||||
|
const CacheReadDeniedMessagePrefix = 'cache read denied:';
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
;// CONCATENATED MODULE: ./node_modules/@actions/cache/lib/internal/cacheUtils.js
|
;// CONCATENATED MODULE: ./node_modules/@actions/cache/lib/internal/cacheUtils.js
|
||||||
var cacheUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var cacheUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
@@ -95147,6 +95151,24 @@ function config_getCacheServiceVersion() {
|
|||||||
return 'v1';
|
return 'v1';
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1';
|
||||||
}
|
}
|
||||||
|
// The cache-mode lattice: readable = {read, write}, writable = {write,
|
||||||
|
// write-only}, none = neither.
|
||||||
|
const KNOWN_CACHE_MODES = ['none', 'read', 'write', 'write-only'];
|
||||||
|
// The effective cache-mode exported by the runner, or '' when not set.
|
||||||
|
function config_getCacheMode() {
|
||||||
|
return (process.env['ACTIONS_CACHE_MODE'] || '').trim().toLowerCase();
|
||||||
|
}
|
||||||
|
// Unset or unrecognized modes are permissive so behavior matches today.
|
||||||
|
function isCacheReadable(mode) {
|
||||||
|
if (!KNOWN_CACHE_MODES.includes(mode))
|
||||||
|
return true;
|
||||||
|
return mode === 'read' || mode === 'write';
|
||||||
|
}
|
||||||
|
function config_isCacheWritable(mode) {
|
||||||
|
if (!KNOWN_CACHE_MODES.includes(mode))
|
||||||
|
return true;
|
||||||
|
return mode === 'write' || mode === 'write-only';
|
||||||
|
}
|
||||||
function getCacheServiceURL() {
|
function getCacheServiceURL() {
|
||||||
const version = config_getCacheServiceVersion();
|
const version = config_getCacheServiceVersion();
|
||||||
// Based on the version of the cache service, we will determine which
|
// Based on the version of the cache service, we will determine which
|
||||||
@@ -95196,6 +95218,7 @@ var cacheHttpClient_awaiter = (undefined && undefined.__awaiter) || function (th
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getCacheApiUrl(resource) {
|
function getCacheApiUrl(resource) {
|
||||||
const baseUrl = getCacheServiceURL();
|
const baseUrl = getCacheServiceURL();
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
@@ -95223,6 +95246,7 @@ function createHttpClient() {
|
|||||||
}
|
}
|
||||||
function getCacheEntry(keys, paths, options) {
|
function getCacheEntry(keys, paths, options) {
|
||||||
return cacheHttpClient_awaiter(this, void 0, void 0, function* () {
|
return cacheHttpClient_awaiter(this, void 0, void 0, function* () {
|
||||||
|
var _a;
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
|
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
|
||||||
const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
|
const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
|
||||||
@@ -95236,6 +95260,12 @@ function getCacheEntry(keys, paths, options) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!requestUtils_isSuccessStatusCode(response.statusCode)) {
|
if (!requestUtils_isSuccessStatusCode(response.statusCode)) {
|
||||||
|
// Only surface the receiver's body for a `cache read denied:` policy denial
|
||||||
|
// so callers can dispatch on it; keep the generic message otherwise.
|
||||||
|
const errorMessage = (_a = response.error) === null || _a === void 0 ? void 0 : _a.message;
|
||||||
|
if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.includes(CacheReadDeniedMessagePrefix)) {
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
throw new Error(`Cache service responded with ${response.statusCode}`);
|
throw new Error(`Cache service responded with ${response.statusCode}`);
|
||||||
}
|
}
|
||||||
const cacheResult = response.result;
|
const cacheResult = response.result;
|
||||||
@@ -96497,6 +96527,7 @@ var cache_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -96512,19 +96543,20 @@ class ReserveCacheError extends Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Stable prefix the receiver writes into the cache reservation response when
|
* Stable prefix the cache service writes into the cache reservation response
|
||||||
* the issuer downgraded the cache token to read-only (for example, because
|
* when the issuer downgraded the cache token to read-only (for example, because
|
||||||
* the run was triggered by an untrusted event). saveCacheV1 / saveCacheV2
|
* the run was triggered by an untrusted event). saveCacheV1 / saveCacheV2
|
||||||
* dispatch on this prefix to re-classify the failure as a
|
* dispatch on this prefix to re-classify the failure as a CacheWriteDeniedError
|
||||||
* CacheWriteDeniedError so consumers (and the outer catch arm) can
|
* so consumers and tests can distinguish a policy denial from other reservation
|
||||||
* distinguish a policy denial from other reservation failures.
|
* failures. Internally it is logged as a non-fatal warning like other
|
||||||
|
* best-effort save failures.
|
||||||
*/
|
*/
|
||||||
const CACHE_WRITE_DENIED_PREFIX = 'cache write denied:';
|
const CACHE_WRITE_DENIED_PREFIX = 'cache write denied:';
|
||||||
/**
|
/**
|
||||||
* Raised when the cache backend refuses to reserve a writable cache entry
|
* Raised when the cache backend refuses to reserve a writable cache entry
|
||||||
* because the JWT issued for this run was scoped read-only (for example, the
|
* because the JWT issued for this run was scoped read-only (for example, the
|
||||||
* run was triggered by an event the repository administrator classified as
|
* run was triggered by an event the repository administrator classified as
|
||||||
* untrusted). The receiver-supplied detail message always begins with
|
* untrusted). The service-supplied detail message always begins with
|
||||||
* `cache write denied:` (the full error message includes additional context
|
* `cache write denied:` (the full error message includes additional context
|
||||||
* like the cache key).
|
* like the cache key).
|
||||||
*
|
*
|
||||||
@@ -96540,6 +96572,19 @@ class CacheWriteDeniedError extends ReserveCacheError {
|
|||||||
Object.setPrototypeOf(this, CacheWriteDeniedError.prototype);
|
Object.setPrototypeOf(this, CacheWriteDeniedError.prototype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Re-exported from constants so consumers keep referencing it here; the shared
|
||||||
|
// value also drives detection in cacheHttpClient without duplicating the string.
|
||||||
|
const CACHE_READ_DENIED_PREFIX = CacheReadDeniedMessagePrefix;
|
||||||
|
// Raised when the cache backend denies a download URL because the run's token
|
||||||
|
// has no readable cache scopes. Caching is best-effort, so restoreCache logs a
|
||||||
|
// warning and reports a cache miss rather than rethrowing this.
|
||||||
|
class CacheReadDeniedError extends Error {
|
||||||
|
constructor(message) {
|
||||||
|
super(message);
|
||||||
|
this.name = 'CacheReadDeniedError';
|
||||||
|
Object.setPrototypeOf(this, CacheReadDeniedError.prototype);
|
||||||
|
}
|
||||||
|
}
|
||||||
class FinalizeCacheError extends Error {
|
class FinalizeCacheError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -96594,6 +96639,12 @@ function restoreCache(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
const cacheServiceVersion = config_getCacheServiceVersion();
|
const cacheServiceVersion = config_getCacheServiceVersion();
|
||||||
core_debug(`Cache service version: ${cacheServiceVersion}`);
|
core_debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
|
const cacheMode = config_getCacheMode();
|
||||||
|
if (!isCacheReadable(cacheMode)) {
|
||||||
|
info(`Cache restore skipped: the effective cache-mode '${cacheMode}' does not permit reads.`);
|
||||||
|
core_debug(`Skipped restore for paths [${paths.join(', ')}] with primary key '${primaryKey}'.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -96615,6 +96666,7 @@ function restoreCache(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
*/
|
*/
|
||||||
function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
||||||
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
|
var _a;
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
const keys = [primaryKey, ...restoreKeys];
|
const keys = [primaryKey, ...restoreKeys];
|
||||||
core_debug('Resolved Keys:');
|
core_debug('Resolved Keys:');
|
||||||
@@ -96629,10 +96681,26 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
let archivePath = '';
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
// path are needed to compute version
|
// path are needed to compute version
|
||||||
const cacheEntry = yield getCacheEntry(keys, paths, {
|
let cacheEntry;
|
||||||
compressionMethod,
|
try {
|
||||||
enableCrossOsArchive
|
cacheEntry = yield getCacheEntry(keys, paths, {
|
||||||
});
|
compressionMethod,
|
||||||
|
enableCrossOsArchive
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// The v1 artifact cache service returns HTTP 403 with a
|
||||||
|
// `cache read denied:` body when the run's token has no readable cache
|
||||||
|
// scopes. getCacheEntry lives in a dependency-free internal module and
|
||||||
|
// cannot import CacheReadDeniedError without a circular dependency, so it
|
||||||
|
// only surfaces the raw denial message; we classify it into the typed
|
||||||
|
// error here so the outer catch and consumers can dispatch on it.
|
||||||
|
const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '';
|
||||||
|
if (errorMessage.includes(CACHE_READ_DENIED_PREFIX)) {
|
||||||
|
throw new CacheReadDeniedError(errorMessage);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
|
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -96661,7 +96729,9 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// warn on cache restore failure and continue build
|
// warn on cache restore failure and continue build
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A read denied by policy (CacheReadDeniedError) is not an HttpClientError
|
||||||
|
// so it falls here and is warned, treated as a cache miss.
|
||||||
if (typedError instanceof lib_HttpClientError &&
|
if (typedError instanceof lib_HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96696,6 +96766,7 @@ function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
*/
|
*/
|
||||||
function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
||||||
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
return cache_awaiter(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
|
var _a;
|
||||||
// Override UploadOptions to force the use of Azure
|
// Override UploadOptions to force the use of Azure
|
||||||
options = Object.assign(Object.assign({}, options), { useAzureSdk: true });
|
options = Object.assign(Object.assign({}, options), { useAzureSdk: true });
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -96717,7 +96788,20 @@ function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
restoreKeys,
|
restoreKeys,
|
||||||
version: getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
|
version: getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
|
||||||
};
|
};
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
let response;
|
||||||
|
try {
|
||||||
|
response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// The receiver returns twirp PermissionDenied (403) when the run's token
|
||||||
|
// has no readable cache scopes. The client wraps that 403, so the stable
|
||||||
|
// prefix is embedded in the message rather than leading it.
|
||||||
|
const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '';
|
||||||
|
if (errorMessage.includes(CACHE_READ_DENIED_PREFIX)) {
|
||||||
|
throw new CacheReadDeniedError(errorMessage);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core_debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
core_debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -96752,8 +96836,10 @@ function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Supress all non-validation cache related errors because caching should be optional
|
// Suppress all non-validation cache related errors because caching should be optional
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A read denied by policy (CacheReadDeniedError) is not an HttpClientError
|
||||||
|
// so it falls here and is warned, treated as a cache miss.
|
||||||
if (typedError instanceof lib_HttpClientError &&
|
if (typedError instanceof lib_HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96792,6 +96878,12 @@ function cache_saveCache(paths_1, key_1, options_1) {
|
|||||||
core.debug(`Cache service version: ${cacheServiceVersion}`);
|
core.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
|
const cacheMode = getCacheMode();
|
||||||
|
if (!isCacheWritable(cacheMode)) {
|
||||||
|
core.info(`Cache save skipped: the effective cache-mode '${cacheMode}' does not permit writes.`);
|
||||||
|
core.debug(`Skipped save for paths [${paths.join(', ')}] with key '${key}'.`);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return yield saveCacheV2(paths, key, options, enableCrossOsArchive);
|
return yield saveCacheV2(paths, key, options, enableCrossOsArchive);
|
||||||
@@ -96869,17 +96961,14 @@ function saveCacheV1(paths_1, key_1, options_1) {
|
|||||||
if (typedError.name === ValidationError.name) {
|
if (typedError.name === ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else if (typedError.name === CacheWriteDeniedError.name) {
|
|
||||||
// Cache write was denied by policy (read-only token). Surface to the
|
|
||||||
// customer at warning level so it is visible in the workflow log
|
|
||||||
// without failing the run.
|
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
}
|
|
||||||
else if (typedError.name === ReserveCacheError.name) {
|
else if (typedError.name === ReserveCacheError.name) {
|
||||||
core.info(`Failed to save: ${typedError.message}`);
|
core.info(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A write denied by policy (CacheWriteDeniedError) is not an
|
||||||
|
// HttpClientError and its name does not match the ReserveCacheError arm,
|
||||||
|
// so it falls here and is warned without failing the run.
|
||||||
if (typedError instanceof HttpClientError &&
|
if (typedError instanceof HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
@@ -96990,12 +97079,6 @@ function saveCacheV2(paths_1, key_1, options_1) {
|
|||||||
if (typedError.name === ValidationError.name) {
|
if (typedError.name === ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else if (typedError.name === CacheWriteDeniedError.name) {
|
|
||||||
// Cache write was denied by policy (read-only token). Surface to the
|
|
||||||
// customer at warning level so it is visible in the workflow log
|
|
||||||
// without failing the run.
|
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
}
|
|
||||||
else if (typedError.name === ReserveCacheError.name) {
|
else if (typedError.name === ReserveCacheError.name) {
|
||||||
core.info(`Failed to save: ${typedError.message}`);
|
core.info(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
@@ -97003,7 +97086,10 @@ function saveCacheV2(paths_1, key_1, options_1) {
|
|||||||
core.warning(typedError.message);
|
core.warning(typedError.message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Log server errors (5xx) as errors, all other errors as warnings
|
// Log server errors (5xx) as errors, all other errors as warnings.
|
||||||
|
// A write denied by policy (CacheWriteDeniedError) is not an
|
||||||
|
// HttpClientError and its name does not match the ReserveCacheError arm,
|
||||||
|
// so it falls here and is warned without failing the run.
|
||||||
if (typedError instanceof HttpClientError &&
|
if (typedError instanceof HttpClientError &&
|
||||||
typeof typedError.statusCode === 'number' &&
|
typeof typedError.statusCode === 'number' &&
|
||||||
typedError.statusCode >= 500) {
|
typedError.statusCode >= 500) {
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ If there is a specific version of Python that you need and you don't want to wor
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.12.6'
|
python-version: '3.12.6'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -46,8 +46,8 @@ You can specify **only a major and minor version** if you are okay with the most
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -60,8 +60,8 @@ You can specify the version with **prerelease tag** to download and set up an ac
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.14.0-alpha.1'
|
python-version: '3.14.0-alpha.1'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -71,8 +71,8 @@ It's also possible to use **x.y-dev syntax** to download and set up the latest p
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.14-dev'
|
python-version: '3.14-dev'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -84,8 +84,8 @@ Free threaded Python is only available starting with the 3.13 release.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13t'
|
python-version: '3.13t'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -95,8 +95,8 @@ Note that the **t** suffix is not `semver` syntax. If you wish to specify a rang
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '>=3.13'
|
python-version: '>=3.13'
|
||||||
freethreaded: true
|
freethreaded: true
|
||||||
@@ -109,8 +109,8 @@ You can also use several types of ranges that are specified in [semver](https://
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '>=3.9 <3.14'
|
python-version: '>=3.9 <3.14'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -120,8 +120,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13.0-alpha - 3.13.0'
|
python-version: '3.13.0-alpha - 3.13.0'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -131,8 +131,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -164,8 +164,8 @@ jobs:
|
|||||||
- 'pypy3.10' # the latest available version of PyPy that supports Python 3.10
|
- 'pypy3.10' # the latest available version of PyPy that supports Python 3.10
|
||||||
- 'pypy3.10-v7.3.17' # Python 3.10 and PyPy 7.3.17
|
- 'pypy3.10-v7.3.17' # Python 3.10 and PyPy 7.3.17
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -182,8 +182,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
3.11
|
3.11
|
||||||
@@ -199,8 +199,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
pypy-3.10-v7.3.x
|
pypy-3.10-v7.3.x
|
||||||
@@ -216,8 +216,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
3.11
|
3.11
|
||||||
@@ -241,9 +241,9 @@ jobs:
|
|||||||
python-version: ['3.x', 'pypy3.8', 'pypy3.9' ]
|
python-version: ['3.x', 'pypy3.8', 'pypy3.9' ]
|
||||||
name: Python ${{ matrix.python-version }} sample
|
name: Python ${{ matrix.python-version }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
@@ -267,9 +267,9 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Display Python version
|
- name: Display Python version
|
||||||
@@ -285,8 +285,8 @@ jobs:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version-file: '.python-version' # Read python version from a file .python-version
|
python-version-file: '.python-version' # Read python version from a file .python-version
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -294,8 +294,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version-file: 'pyproject.toml' # Read python version from a file pyproject.toml
|
python-version-file: 'pyproject.toml' # Read python version from a file pyproject.toml
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -303,8 +303,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version-file: '.tool-versions' # Read python version from a file .tool-versions
|
python-version-file: '.tool-versions' # Read python version from a file .tool-versions
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -312,8 +312,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version-file: 'Pipfile' # Read python version from a file Pipfile
|
python-version-file: 'Pipfile' # Read python version from a file Pipfile
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
@@ -327,8 +327,8 @@ If `check-latest` is set to `true`, the action first checks if the cached versio
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
@@ -342,8 +342,8 @@ steps:
|
|||||||
**Caching pipenv dependencies:**
|
**Caching pipenv dependencies:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
@@ -355,10 +355,10 @@ steps:
|
|||||||
**Caching poetry dependencies:**
|
**Caching poetry dependencies:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pipx install poetry
|
run: pipx install poetry
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'poetry'
|
cache: 'poetry'
|
||||||
@@ -370,8 +370,8 @@ steps:
|
|||||||
**Using a list of file paths to cache dependencies**
|
**Using a list of file paths to cache dependencies**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
@@ -385,8 +385,8 @@ steps:
|
|||||||
**Using wildcard patterns to cache dependencies**
|
**Using wildcard patterns to cache dependencies**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -397,8 +397,8 @@ steps:
|
|||||||
**Using a list of wildcard patterns to cache dependencies**
|
**Using a list of wildcard patterns to cache dependencies**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -412,8 +412,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -435,8 +435,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
id: cp312
|
id: cp312
|
||||||
with:
|
with:
|
||||||
python-version: "3.9.0 - 3.12.0"
|
python-version: "3.9.0 - 3.12.0"
|
||||||
@@ -452,8 +452,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
id: cp313
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
@@ -468,8 +468,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
id: cp313
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: "3.13.0"
|
python-version: "3.13.0"
|
||||||
@@ -499,8 +499,8 @@ Such a requirement on side-effect could be because you don't want your composite
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
id: cp313
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
@@ -645,8 +645,8 @@ jobs:
|
|||||||
python_version: ["3.14"]
|
python_version: ["3.14"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: "${{ matrix.python_version }}"
|
python-version: "${{ matrix.python_version }}"
|
||||||
allow-prereleases: true
|
allow-prereleases: true
|
||||||
@@ -660,9 +660,9 @@ The version of Pip should be specified in the format `major`, `major.minor`, or
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
pip-version: '25.0.1'
|
pip-version: '25.0.1'
|
||||||
|
|||||||
38
package-lock.json
generated
38
package-lock.json
generated
@@ -9,7 +9,7 @@
|
|||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^6.1.0",
|
"@actions/cache": "^6.2.0",
|
||||||
"@actions/core": "^3.0.1",
|
"@actions/core": "^3.0.1",
|
||||||
"@actions/exec": "^3.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/glob": "^0.7.0",
|
"@actions/glob": "^0.7.0",
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache": {
|
"node_modules/@actions/cache": {
|
||||||
"version": "6.1.0",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-6.2.0.tgz",
|
||||||
"integrity": "sha512-LVqybSbzhBp2uAETOQ3HnVjXA4AcjavgMH+LCr+cjgO+PZfciv/1QAgoW+esXBaAhvDid+vXeV70GGJpAh4V5Q==",
|
"integrity": "sha512-Nv0xWRmbxfDbAn/70flO/F6tj2Nv4XTYMAsQHiDFSojCDfso/Zni+fRKa14ToI9hnmOW/rQcY1WYb6wsM7Pgwg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^3.0.1",
|
"@actions/core": "^3.0.1",
|
||||||
@@ -2197,9 +2197,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2214,9 +2211,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2231,9 +2225,6 @@
|
|||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2248,9 +2239,6 @@
|
|||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2265,9 +2253,6 @@
|
|||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2282,9 +2267,6 @@
|
|||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2299,9 +2281,6 @@
|
|||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2316,9 +2295,6 @@
|
|||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2333,9 +2309,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -2350,9 +2323,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^6.1.0",
|
"@actions/cache": "^6.2.0",
|
||||||
"@actions/core": "^3.0.1",
|
"@actions/core": "^3.0.1",
|
||||||
"@actions/exec": "^3.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/glob": "^0.7.0",
|
"@actions/glob": "^0.7.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user