Skip to content

Commit

Permalink
Use upstream action to download releases info
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarsj committed Jan 29, 2025
1 parent 14b9c0e commit c1ae4ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
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:
Expand Down

0 comments on commit c1ae4ce

Please sign in to comment.