Use upstream action to download releases info

This commit is contained in:
Óscar San José
2025-01-29 12:54:53 +01:00
parent 14b9c0ec59
commit c1ae4cee22
2 changed files with 5 additions and 10 deletions

View File

@@ -22,12 +22,9 @@ jobs:
python-version: "3.7"
- name: Checkout CodeQL Action
uses: actions/checkout@v4
- name: Checkout Enterprise Releases
uses: actions/checkout@v4
with:
repository: github/enterprise-releases
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
path: ${{ github.workspace }}/enterprise-releases/
- name: Get Enterprise Server Versions
id: get-versions
uses: github/enterprise-releases/actions/maintained_features@master
- name: Update Supported Enterprise Server Versions
run: |
cd ./.github/workflows/update-supported-enterprise-server-versions/
@@ -37,7 +34,7 @@ jobs:
rm --recursive "$ENTERPRISE_RELEASES_PATH"
npm run build
env:
ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/
MAINTAINED_RELEASES: ${{ steps.get-versions.outputs.maintained_releases }}
- name: Update git config
run: |

View File

@@ -7,14 +7,12 @@ import pathlib
import semver
_API_COMPATIBILITY_PATH = pathlib.Path(__file__).absolute().parents[3] / "src" / "api-compatibility.json"
_ENTERPRISE_RELEASES_PATH = pathlib.Path(os.environ["ENTERPRISE_RELEASES_PATH"])
_RELEASE_FILE_PATH = _ENTERPRISE_RELEASES_PATH / "releases.json"
_FIRST_SUPPORTED_RELEASE = semver.VersionInfo.parse("2.22.0") # Versions older than this did not include Code Scanning.
def main():
api_compatibility_data = json.loads(_API_COMPATIBILITY_PATH.read_text())
releases = json.loads(_RELEASE_FILE_PATH.read_text())
releases = json.loads(os.environ["MAINTAINED_RELEASES"])
# Remove GHES version using a previous version numbering scheme.
if "11.10" in releases: